편집

다음을 통해 공유


Get-VMHostAssignableDevice

Retrieves device information assigned to a virtual machine (VM) host.

Syntax

Default (Default)

Get-VMHostAssignableDevice
    [-InstancePath <String>]
    [-LocationPath <String>]
    [-ResourcePoolName <String[]>]
    [-CimSession <CimSession[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential[]>]
    [<CommonParameters>]

Description

The Get-VMHostAssignableDevice cmdlet retrieves information about devices that can be assigned to a virtual machine host. This can include devices such as GPUs, network adapters, or storage controllers that are physically present on the host system. The cmdlet can filter devices by their instance path or ___location path.

Examples

Example 1

Get-VMHostAssignableDevice

This example retrieves all assignable devices on the host computer.

Example 2

Get-VMHostAssignableDevice -ComputerName "MyHost"

In this example, the cmdlet retrieves all assignable devices from the computer named MyHost.

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

(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

-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

-ResourcePoolName

Retrieves the name of the resource pool to which the device is assigned.

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

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