Edit

Share via


Dismount-VMHostAssignableDevice

Dismounts a device from a virtual machine (VM) host.

Syntax

Default (Default)

Dismount-VMHostAssignableDevice
    [-InstancePath <String>]
    [-LocationPath <String>]
    [-Force]
    [-Passthru]
    [-CimSession <CimSession[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential[]>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Dismount-VMHostAssignableDevice cmdlet is used to dismount an assignable device from the virtual machine host. Use this cmdlet when you need to reassign a device or resolve conflicts between devices and virtual machines.

Examples

Example 1

Dismount-VMHostAssignableDevice -InstancePath "PCIROOT(0)#PCI(1D02)#PCI(0000)"

This example dismounts the device with the specified instance path from the host, making it available for assignment to a virtual machine.

Parameters

-CimSession

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.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComputerName

Specifies one or more Hyper-V hosts from which the assignable devices are to be dismounted. 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.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

Path
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Credential

Specifies one or more user accounts that have permission to perform this action. The default is the current user.

Parameter properties

Type:

PSCredential[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

Forces the command to run without asking for user confirmation.

Using the Force parameter also overrides some security checks in the platform. To learn more, see Dismount the device from the host partition .

If no partitioning driver is provided, during dismount, you must use -Force to bypass the security warning. For more information about the security implications, see Plan for deploying devices by using Discrete Device Assignment.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InstancePath

Represents the Device Instance path in the host machine.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LocationPath

Specifies the location path to the assignable device.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Passthru

Returns an object for each process that the cmdlet started.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

None

Outputs

Microsoft.HyperV.PowerShell.VMHostAssignableDevice