description | external help file | Module Name | ms.date | online version | schema | title |
---|---|---|---|---|---|---|
Removes an assigned GPU partition from a virtual machine. |
Microsoft.HyperV.PowerShell.Cmdlets.dll-Help.xml |
Hyper-V |
06/12/2024 |
2.0.0 |
Remove-VMGpuPartitionAdapter |
Removes an assigned GPU partition from a virtual machine.
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>]
The Remove-VMGpuPartitionAdapter
cmdlet removes an assigned graphic processing unit partition from
a virtual machine and releases that partition back to the host GPU.
$testvm = Get-VM "TestVM"
Remove-VMGpuPartitionAdapter -VM $testvm
This example removes a partition assigned to a specific VM object.
$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.
This is a VM's GPU partition identification number used to remove a GPU from a VM.
Type: String
Parameter Sets: VMName, VMObject
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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[]
Parameter Sets: VMName
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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[]
Parameter Sets: VMName
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
Type: PSCredential[]
Parameter Sets: VMName
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Returns an object for each process that the cmdlet started.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
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[]
Parameter Sets: VMObject
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
GPU partition object obtained from Get-VMGpuPartitionAdapter
.
Type: VMGpuPartitionAdapter[]
Parameter Sets: Object
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specifies the name of the virtual machine whose network adapters are to be removed.
Type: String[]
Parameter Sets: VMName
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.