This section describes the Get-MDTPersistentDrive Windows PowerShell cmdlet. Run this cmdlet from a Windows PowerShell console that has the MDT PowerShell snap-in loaded. For more information on how to start a Windows PowerShell console that has the MDT PowerShell snap-in loaded, see Loading the MDT Windows PowerShell Snap-In.
Syntax
Remove-MDTMonitorData [-Path <String>] [-ID <Int32>] [<CommonParameters>]
–or–
Remove-MDTMonitorData [-Path <String>] [-ComputerObject <PSObject>] [<CommonParameters>]
Description
This cmdlet removes collected monitoring data from the existing collected monitoring data in a deployment share. You can identify the monitoring data to remove by specifying the:
· Identifier (ID) of the monitoring item for a specific deployment share. The monitoring item IDs are automatically generated and assigned to the item when the item is created for the deployment share. The first syntax example illustrates this usage.
· Computer object for the monitoring item in the deployment share. The computer object can be obtained using the Get-MDTMonitorData cmdlet. The last syntax example illustrates this usage.
Note Once the monitoring data has been removed, there is no method for recovering the information.
Parameters
This subsection provides information about the various parameters that can be used with the Get- MDTMonitorData cmdlet.
-Path <String>
This parameter specifies the MDTProvider Windows PowerShell drive for the desired deployment share.
Note If this parameter is not provided, then the Windows PowerShell working directory must default to a location within the desired MDTProvider Windows PowerShell drive.
Parameter |
Value |
Required? |
False |
Position? |
Named |
Default value |
– |
Accept pipeline input? |
False |
Accept wildcard characters? |
False |
-ID <Nullable>
This parameter specifies the monitoring data item to be removed using the identifier of the monitoring data item. If this parameter is not specified, then the ComputerObject parameter must be specified to identify a particular monitoring data item.
Parameter |
Value |
Required? |
False |
Position? |
Named |
Default value |
– |
Accept pipeline input? |
True (ByValue) |
Accept wildcard characters? |
False |
-ComputerObject <PSObject>
This parameter specifies the monitoring data item to be removed using a computer object. If this parameter is not specified, then the ID parameter must be specified to identify a particular monitoring data item.
Parameter |
Value |
Required? |
False |
Position? |
Named |
Default value |
– |
Accept pipeline input? |
True (ByValue) |
Accept wildcard characters? |
False |
<CommonParameters>
This cmdlet supports the following common parameters: Verbose, Debug, ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, and WarningVariable. For more information, see the topic, “about_CommonParameters,” which you can access by typing the following command, and then pressing ENTER:
Get-Help about_CommonParameters
Outputs
This cmdlet may output a String type object if the Verbose common parameter is included; otherwise, no output is generated.
Example 1
Remove-MDTMonitorData -Path "DS001:" -ID 3
Description
This example removes the monitoring data item with an ID that has a value of 3 from the deployment share at the Windows PowerShell path DS001:.
Example 2
Remove-MDTMonitorData -ID 3
Description
This example removes the monitoring data item with an ID that has a value of 3 from the deployment share at the default Windows PowerShell path.
Example 3
$MonitorObject=Get-MDTMonitorData | Where-Object {$_.Name ‑eq 'WDG-REF-01'}
Remove-MDTMonitorData -ComputerObject $MonitorObject
Description
This example removes any monitoring data item where the name of the computer is WDG-REF-01. The object is found using the Get-MDTMonitorData cmdlet and the Where-Object cmdlet. For more information on the Where-Object cmdlet, see Using the Where-Object Cmdlet.
Related Topics