Editar

Partilhar via


Dismount-VMHostAssignableDevice

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

Syntax

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.

Type:CimSession[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

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

-Credential

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

-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.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InstancePath

Represents 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

-LocationPath

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

-Passthru

Returns an object for each process that the cmdlet started.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

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

Inputs

None

Outputs

Microsoft.HyperV.PowerShell.VMHostAssignableDevice