編集

次の方法で共有


Remove-VMGpuPartitionAdapter

Removes an assigned GPU partition from a virtual machine.

Syntax

Remove-VMGpuPartitionAdapter
      [-CimSession <CimSession[]>]
      [-ComputerName <String[]>]
      [-Credential <PSCredential[]>]
      [-VMName] <String[]>
      [-Passthru]
      [-AdapterId <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-VMGpuPartitionAdapter
      [-VM] <VirtualMachine[]>
      [-Passthru]
      [-AdapterId <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-VMGpuPartitionAdapter
      [-VMGpuPartitionAdapter] <VMGpuPartitionAdapter[]>
      [-Passthru]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-VMGpuPartitionAdapter cmdlet removes an assigned graphic processing unit partition from a virtual machine and releases that partition back to the host GPU.

Examples

Example 1

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

This example removes a partition assigned to a specific VM object.

Example 2

$testvm = Get-VM "TestVM"
$GPUpartition = Get-VMGpuPartitionAdapter -VM $testvm
Remove-VMGpuPartitionAdapter -VM $testvm -AdapterId $GPUpartiton[0].id

This example removes a specific partition object from a specific VM.

Parameters

-AdapterId

This is a VM's GPU partition identification number used to remove a GPU from 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

-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

-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

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

-VMGpuPartitionAdapter

GPU partition object obtained from Get-VMGpuPartitionAdapter.

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

-VMName

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

Type:String[]
Position:0
Default value:None
Required:True
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

Microsoft.HyperV.PowerShell.VirtualMachine[]

Microsoft.HyperV.PowerShell.VMGpuPartitionAdapter[]

Outputs

Microsoft.HyperV.PowerShell.VMGpuPartitionAdapter