편집

다음을 통해 공유


Get-VMAssignableDevice

Retrieves information about the assignable device from a specific virtual machine.

Syntax

VMName (Default)

Get-VMAssignableDevice
    [-VMName] <String[]>
    [-CimSession <CimSession[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential[]>]
    [-InstancePath <String>]
    [-LocationPath <String>]
    [<CommonParameters>]

VMObject

Get-VMAssignableDevice
    [-VM] <VirtualMachine[]>
    [-InstancePath <String>]
    [-LocationPath <String>]
    [<CommonParameters>]

Description

The Get-VMAssignableDevice cmdlet retrieves information about the assignable devices that are associated with a specific virtual machine (VM). This cmdlet can be used to list all assignable devices that can be attached to a VM or to retrieve details about specific devices that are already assigned. The retrieved information can include the device's instance path, ___location path, and other relevant properties.

Examples

Example 1

Get-VMAssignableDevice -VMName "MyVM"

This example retrieves all assignable devices associated with the virtual machine named MyVM.

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

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

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

-Credential

Retrieves 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

VMName
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

-VM

Retrieves the virtual machine which a device is assigned.

Parameter properties

Type:

VirtualMachine[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMObject
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMName

Retrieves the names of the assignable devices assigned to the specified virtual machine.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMName
Position:0
Mandatory:True
Value from pipeline:True
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

String

Microsoft.HyperV.PowerShell.VirtualMachine

Outputs

Microsoft.HyperV.PowerShell.VMAssignedDevice