Remove-VMHostAssignableDevice
Removes a device assigned to a virtual machine (VM) host.
Remove-VMHostAssignableDevice
[-CimSession <CimSession[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential[]>]
[-InstancePath <String>]
[-LocationPath <String>]
-ResourcePoolName <String[]>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-VMHostAssignableDevice
[-HostAssignableDevice] <VMHostAssignableDevice[]>
-ResourcePoolName <String[]>
[-Force]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
The Remove-VMHostAssignableDevice
cmdlet removes a device that is assigned to a virtual machine
host. Depending on the parameters specified, you can remove devices by providing either the
instance or location path of the device.
$params = @{
InstancePath = "PCIROOT(0)#PCI(0300)#PCI(0000)"
ResourcePoolName = "MyResourcePool"
}
Remove-VMHostAssignableDevice $params
This example removes the device with the specified instance path from the resource pool named MyResourcePool.
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Type: | CimSession[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies one or more Hyper-V hosts from which the assignable devices are to be removed. NetBIOS
names, IP addresses, and fully qualified domain names are allowed. The default is the local
computer. Use localhost or a dot (.
) to specify the local computer explicitly.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
Type: | PSCredential[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the device object to be removed. You can get this object using
Get-VMHostAssignableDevice
.
Type: | VMHostAssignableDevice[] |
Aliases: | VMHostAssignableDevice |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the Device Instance path in the host machine.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the location path to the assignable device.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name of the resource pool from which to remove an assignable device.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Microsoft.HyperV.PowerShell.VMHostAssignableDevice[]