편집

다음을 통해 공유


Get-VMHostAssignableDevice

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

Syntax

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.

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

Type:String[]
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

-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

-ResourcePoolName

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

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

Inputs

None

Outputs

Microsoft.HyperV.PowerShell.VMHostAssignableDevice