編輯

共用方式為


Get-VMGpuPartitionAdapter

Gets the information of assigned GPU partitions to a virtual machine.

Syntax

Get-VMGpuPartitionAdapter
   [-CimSession <CimSession[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential[]>]
   [-VMName] <String[]>
   [-AdapterId <String>]
   [<CommonParameters>]
Get-VMGpuPartitionAdapter
   [-VM] <VirtualMachine[]>
   [-AdapterId <String>]
   [<CommonParameters>]

Description

The Get-VMGpuPartitionAdapter cmdlet gets the information of assigned graphic processing unit partitions to a virtual machine.

Examples

Example 1

$testvm = Get-VM "TestVM"
Get-VMGpuPartitionAdapter -VM $testvm

This example gets the GPU information assigned to a VM object.

Parameters

-AdapterId

This is a VM's GPU partition identification number used to display the GPU information assigned to a VM.

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

-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 on the virtual network adapters 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

-VM

Specifies the virtual machine whose virtual network adapters are to be retrieved. The asterisk (*) is the wildcard. If it is specified the cmdlet returns virtual network adapters from every virtual machine in the system.

Type:VirtualMachine[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-VMName

Specifies the name of the virtual machine whose network adapters are to be retrieved.

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

Inputs

String[]

Microsoft.HyperV.PowerShell.VirtualMachine[]

Outputs

Microsoft.HyperV.PowerShell.VMGpuPartitionAdapter