From ec3f12c51baec466e05768f33085a7a9fd977aef Mon Sep 17 00:00:00 2001 From: Xelu86 <103963494+Xelu86@users.noreply.github.com> Date: Mon, 8 Jul 2024 12:25:14 -0400 Subject: [PATCH] Updated command set --- .../hyper-v/Add-VMGpuPartitionAdapter.md | 111 +++++++++++++----- .../hyper-v/Get-VMGpuPartitionAdapter.md | 64 +++++++--- .../hyper-v/Remove-VMGpuPartitionAdapter.md | 69 +++++++---- .../hyper-v/Set-VMGpuPartitionAdapter.md | 109 ++++++++++++----- 4 files changed, 257 insertions(+), 96 deletions(-) diff --git a/docset/winserver2025-ps/hyper-v/Add-VMGpuPartitionAdapter.md b/docset/winserver2025-ps/hyper-v/Add-VMGpuPartitionAdapter.md index c20efc5557..81e37bb922 100644 --- a/docset/winserver2025-ps/hyper-v/Add-VMGpuPartitionAdapter.md +++ b/docset/winserver2025-ps/hyper-v/Add-VMGpuPartitionAdapter.md @@ -2,7 +2,7 @@ description: Adds a GPU partition adapter to a virtual machine. external help file: Microsoft.HyperV.PowerShell.Cmdlets.dll-Help.xml Module Name: Hyper-V -ms.date: 09/22/2022 +ms.date: 06/12/2024 online version: https://learn.microsoft.com/powershell/module/hyper-v/add-vmgpupartitionadapter?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Add-VMGpuPartitionAdapter @@ -16,53 +16,62 @@ Adds a GPU partition adapter to a virtual machine. ## SYNTAX ### VMName (Default) + ``` Add-VMGpuPartitionAdapter [-CimSession ] [-ComputerName ] [-Credential ] [-VMName] [-Passthru] [-InstancePath ] [-MinPartitionVRAM ] [-MaxPartitionVRAM ] [-OptimalPartitionVRAM ] [-MinPartitionEncode ] [-MaxPartitionEncode ] [-OptimalPartitionEncode ] [-MinPartitionDecode ] [-MaxPartitionDecode ] [-OptimalPartitionDecode ] - [-MinPartitionCompute ] [-MaxPartitionCompute ] [-OptimalPartitionCompute ] [-WhatIf] - [-Confirm] [] + [-MinPartitionCompute ] [-MaxPartitionCompute ] [-OptimalPartitionCompute ] + [-WhatIf] [-Confirm] [] ``` ### VMObject + ``` Add-VMGpuPartitionAdapter [-VM] [-Passthru] [-InstancePath ] [-MinPartitionVRAM ] [-MaxPartitionVRAM ] [-OptimalPartitionVRAM ] [-MinPartitionEncode ] [-MaxPartitionEncode ] [-OptimalPartitionEncode ] [-MinPartitionDecode ] [-MaxPartitionDecode ] [-OptimalPartitionDecode ] - [-MinPartitionCompute ] [-MaxPartitionCompute ] [-OptimalPartitionCompute ] [-WhatIf] - [-Confirm] [] + [-MinPartitionCompute ] [-MaxPartitionCompute ] [-OptimalPartitionCompute ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -The 'Add-VMGpuPartitionAdapter' cmdlet adds a GPU partition adapter to a virtual machine. With no parameter, it assigns a full partition from an assignable GPU to a VM. + +The `Add-VMGpuPartitionAdapter` cmdlet adds a GPU partition adapter to a virtual machine. With no +parameter, it assigns a full partition from an assignable GPU to a VM. ## EXAMPLES ### Example 1 + ```powershell -$vm = Get-VM -name "TestVM" +$vm = Get-VM -Name "TestVM" Add-VMGpuPartitionAdapter -VM $vm ``` This example assigns a partition to a specific VM object. ### Example 2 + ```powershell -$vm = Get-VM -name "TestVM" -Add-VMGpuPartitionAdapter -VM $vm -Instancepath "SampleGPUInstancePath" +$vm = Get-VM -Name "TestVM" +Add-VMGpuPartitionAdapter -VM $vm -InstancePath "GPUInstancePath" ``` -This example assigns a partition from a specific GPU to a VM where the instance path is the GPU device ID name on the host. +This example assigns a partition from a specific GPU to a VM where the instance path is the GPU +device ID name on the host. ## 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](https://go.microsoft.com/fwlink/p/?LinkId=227967) or [Get-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227966) cmdlet. -The default is the current session on the local computer. + +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](/powershell/module/cimcmdlets/new-cimsession) +or [Get-CimSession](/powershell/module/cimcmdlets/get-cimsession) cmdlet. The default is the +current session on the local computer. ```yaml Type: CimSession[] @@ -77,10 +86,10 @@ Accept wildcard characters: False ``` ### -ComputerName -Specifies one or more Hyper-V hosts from which virtual machines are to be retrieved. -NetBIOS names, IP addresses, and fully qualified domain names are allowable. -The default is the local computer. -Use localhost or a dot ('.') to specify the local computer explicitly. + +Specifies one or more Hyper-V hosts from which virtual machines are to be retrieved. NetBIOS names, +IP addresses, and fully qualified domain names are allowable. The default is the local computer. +Use localhost or a dot (`.`) to specify the local computer explicitly. ```yaml Type: String[] @@ -95,8 +104,9 @@ Accept wildcard characters: False ``` ### -Credential -Specifies one or more user accounts that have permission to perform this action. -The default is the current user. + +Specifies one or more user accounts that have permission to perform this action. The default is the +current user. ```yaml Type: PSCredential[] @@ -111,7 +121,9 @@ Accept wildcard characters: False ``` ### -InstancePath -Represents the Device Instance path of a GPU in the host. This value can be obtained from the "Name" property of the command 'Get-VMHostPartitionableGpu'. + +Represents the Device Instance path of a GPU in the host. This value can be obtained from the +"Name" property of the command `Get-VMHostPartitionableGpu`. ```yaml Type: String @@ -126,7 +138,9 @@ Accept wildcard characters: False ``` ### -MaxPartitionCompute -The maximum number of compute assigned by the host GPU. This is defined by the manufacturer's driver. + +The maximum number of compute assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -141,7 +155,9 @@ Accept wildcard characters: False ``` ### -MaxPartitionDecode -The maximum number of decoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The maximum number of decoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -156,7 +172,9 @@ Accept wildcard characters: False ``` ### -MaxPartitionEncode -The maximum number of encoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The maximum number of encoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -171,6 +189,7 @@ Accept wildcard characters: False ``` ### -MaxPartitionVRAM + The maximum VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver. ```yaml @@ -186,7 +205,9 @@ Accept wildcard characters: False ``` ### -MinPartitionCompute -The minimum number of compute assigned by the host GPU. This is defined by the manufacturer's driver. + +The minimum number of compute assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -201,7 +222,9 @@ Accept wildcard characters: False ``` ### -MinPartitionDecode -The minimum number of decoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The minimum number of decoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -216,7 +239,9 @@ Accept wildcard characters: False ``` ### -MinPartitionEncode -The minimum number of encoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The minimum number of encoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -231,6 +256,7 @@ Accept wildcard characters: False ``` ### -MinPartitionVRAM + The minimum VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver. ```yaml @@ -246,7 +272,9 @@ Accept wildcard characters: False ``` ### -OptimalPartitionCompute -The optimal number of compute assigned by the host GPU. This is defined by the manufacturer's driver. + +The optimal number of compute assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -261,7 +289,9 @@ Accept wildcard characters: False ``` ### -OptimalPartitionDecode -The optimal number of decoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The optimal number of decoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -276,7 +306,9 @@ Accept wildcard characters: False ``` ### -OptimalPartitionEncode -The optimal number of encoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The optimal number of encoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -291,6 +323,7 @@ Accept wildcard characters: False ``` ### -OptimalPartitionVRAM + The optimal VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver. ```yaml @@ -306,6 +339,7 @@ Accept wildcard characters: False ``` ### -Passthru + Returns an object for each process that the cmdlet started. ```yaml @@ -321,6 +355,7 @@ Accept wildcard characters: False ``` ### -VM + Specifies the virtual machine on which the network adapter is to be added. ```yaml @@ -336,6 +371,7 @@ Accept wildcard characters: False ``` ### -VMName + Specifies the name of the virtual machine on which the network adapter is to be added. ```yaml @@ -351,6 +387,7 @@ Accept wildcard characters: False ``` ### -Confirm + Prompts you for confirmation before running the cmdlet. ```yaml @@ -366,8 +403,8 @@ Accept wildcard characters: False ``` ### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. + +Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml Type: SwitchParameter @@ -382,7 +419,11 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters). ## INPUTS @@ -397,3 +438,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + +- [Get-VMGpuPartitionAdapter](get-vmgpupartitionadapter.md) + +- [Remove-VMGpuPartitionAdapter](remove-vmgpupartitionadapter.md) + +- [Set-VMGpuPartitionAdapter](set-vmgpupartitionadapter.md) diff --git a/docset/winserver2025-ps/hyper-v/Get-VMGpuPartitionAdapter.md b/docset/winserver2025-ps/hyper-v/Get-VMGpuPartitionAdapter.md index 4143c49ecd..07ff8b3907 100644 --- a/docset/winserver2025-ps/hyper-v/Get-VMGpuPartitionAdapter.md +++ b/docset/winserver2025-ps/hyper-v/Get-VMGpuPartitionAdapter.md @@ -2,7 +2,7 @@ description: Gets the information of assigned GPU partitions to a virtual machine. external help file: Microsoft.HyperV.PowerShell.Cmdlets.dll-Help.xml Module Name: Hyper-V -ms.date: 09/22/2022 +ms.date: 06/12/2024 online version: https://learn.microsoft.com/powershell/module/hyper-v/get-vmgpupartitionadapter?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Get-VMGpuPartitionAdapter @@ -16,33 +16,54 @@ Gets the information of assigned GPU partitions to a virtual machine. ## SYNTAX ### VMName (Default) + ``` Get-VMGpuPartitionAdapter [-CimSession ] [-ComputerName ] [-Credential ] [-VMName] [-AdapterId ] [] ``` ### VMObject + ``` Get-VMGpuPartitionAdapter [-VM] [-AdapterId ] [] ``` ## DESCRIPTION -The 'Get-VMGpuPartitionAdapter' cmdlet gets the information of assigned graphic processing unit partitions to a virtual machine. + +The `Get-VMGpuPartitionAdapter` cmdlet gets the information of assigned graphic processing unit +partitions to a virtual machine. ## EXAMPLES ### Example 1 + ```powershell -$testvm = get-VM "TestVM" +$testvm = Get-VM "TestVM" Get-VMGpuPartitionAdapter -VM $testvm ``` This example gets the GPU information assigned to a VM object. +### Example 2 + +```powershell +Get-VMGpuPartitionAdapter -VMName "TestVM" | FL InstancePath, Id, SupportsOutgoingLiveMigration +``` + +This command retrieves information about the GPU partition adapter for the virtual machine named +**TestVM** and displays the `InstancePath`, `Id`, and `SupportsOutgoingLiveMigration` properties. + +When live migrating a virtual machine with a GPU partition adapter, certain hardware and software +conditions must be met on both the source and target hosts. The `SupportsOutgoingLiveMigration` +field can be used to pre-validate a live migration, ensuring that all necessary conditions are met +before attempting the migration. + ## PARAMETERS ### -AdapterId -This is a VM's GPU partition identification number used to display the GPU information assigned to a VM. + +This is a VM's GPU partition identification number used to display the GPU information assigned to a +VM. ```yaml Type: String @@ -57,9 +78,11 @@ 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](https://go.microsoft.com/fwlink/p/?LinkId=227967) or [Get-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227966) cmdlet. -The default is the current session on the local computer. + +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](/powershell/module/cimcmdlets/new-cimsession) +or [Get-CimSession](/powershell/module/cimcmdlets/get-cimsession) cmdlet. The default is the +current session on the local computer. ```yaml Type: CimSession[] @@ -74,10 +97,10 @@ 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. + +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. ```yaml Type: String[] @@ -92,8 +115,9 @@ Accept wildcard characters: False ``` ### -Credential -Specifies one or more user accounts that have permission to perform this action. -The default is the current user. + +Specifies one or more user accounts that have permission to perform this action. The default is the +current user. ```yaml Type: PSCredential[] @@ -108,6 +132,7 @@ 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. @@ -125,6 +150,7 @@ Accept wildcard characters: True ``` ### -VMName + Specifies the name of the virtual machine whose network adapters are to be retrieved. ```yaml @@ -140,7 +166,11 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters). ## INPUTS @@ -155,3 +185,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + +- [Add-VMGpuPartitionAdapter](add-vmgpupartitionadapter.md) + +- [Remove-VMGpuPartitionAdapter](remove-vmgpupartitionadapter.md) + +- [Set-VMGpuPartitionAdapter](set-vmgpupartitionadapter.md) diff --git a/docset/winserver2025-ps/hyper-v/Remove-VMGpuPartitionAdapter.md b/docset/winserver2025-ps/hyper-v/Remove-VMGpuPartitionAdapter.md index 052bd5e136..efd3a8e770 100644 --- a/docset/winserver2025-ps/hyper-v/Remove-VMGpuPartitionAdapter.md +++ b/docset/winserver2025-ps/hyper-v/Remove-VMGpuPartitionAdapter.md @@ -2,7 +2,7 @@ description: Removes an assigned GPU partition from a virtual machine. external help file: Microsoft.HyperV.PowerShell.Cmdlets.dll-Help.xml Module Name: Hyper-V -ms.date: 09/22/2022 +ms.date: 06/12/2024 online version: https://learn.microsoft.com/powershell/module/hyper-v/remove-vmgpupartitionadapter?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Remove-VMGpuPartitionAdapter @@ -16,30 +16,36 @@ Removes an assigned GPU partition from a virtual machine. ## SYNTAX ### VMName (Default) + ``` Remove-VMGpuPartitionAdapter [-CimSession ] [-ComputerName ] - [-Credential ] [-VMName] [-Passthru] [-AdapterId ] [-WhatIf] [-Confirm] - [] + [-Credential ] [-VMName] [-Passthru] [-AdapterId ] [-WhatIf] + [-Confirm] [] ``` ### VMObject + ``` -Remove-VMGpuPartitionAdapter [-VM] [-Passthru] [-AdapterId ] [-WhatIf] [-Confirm] - [] +Remove-VMGpuPartitionAdapter [-VM] [-Passthru] [-AdapterId ] [-WhatIf] + [-Confirm] [] ``` ### Object + ``` -Remove-VMGpuPartitionAdapter [-VMGpuPartitionAdapter] [-Passthru] [-WhatIf] - [-Confirm] [] +Remove-VMGpuPartitionAdapter [-VMGpuPartitionAdapter] [-Passthru] + [-WhatIf] [-Confirm] [] ``` ## 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. + +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 + ```powershell $testvm = Get-VM "TestVM" Remove-VMGpuPartitionAdapter -VM $testvm @@ -48,6 +54,7 @@ Remove-VMGpuPartitionAdapter -VM $testvm This example removes a partition assigned to a specific VM object. ### Example 2 + ```powershell $testvm = Get-VM "TestVM" $GPUpartition = Get-VMGpuPartitionAdapter -VM $testvm @@ -59,7 +66,8 @@ 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. + +This is a VM's GPU partition identification number used to remove a GPU from a VM. ```yaml Type: String @@ -74,9 +82,11 @@ 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](https://go.microsoft.com/fwlink/p/?LinkId=227967) or [Get-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227966) cmdlet. -The default is the current session on the local computer. + +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](/powershell/module/cimcmdlets/new-cimsession) +or [Get-CimSession](/powershell/module/cimcmdlets/get-cimsession) cmdlet. The default is the +current session on the local computer. ```yaml Type: CimSession[] @@ -91,8 +101,10 @@ 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. + +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. ```yaml Type: String[] @@ -107,7 +119,9 @@ Accept wildcard characters: False ``` ### -Credential -Specifies one or more user accounts that have permission to perform this action. The default is the current user. + +Specifies one or more user accounts that have permission to perform this action. The default is the +current user. ```yaml Type: PSCredential[] @@ -122,6 +136,7 @@ Accept wildcard characters: False ``` ### -Passthru + Returns an object for each process that the cmdlet started. ```yaml @@ -137,6 +152,7 @@ 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. @@ -154,7 +170,8 @@ Accept wildcard characters: False ``` ### -VMGpuPartitionAdapter -GPU partition object obtained from 'Get-VMGpuPartitionAdapter'. + +GPU partition object obtained from `Get-VMGpuPartitionAdapter`. ```yaml Type: VMGpuPartitionAdapter[] @@ -169,7 +186,8 @@ Accept wildcard characters: False ``` ### -VMName -Specifies the name of the virtual machine whose network adapters are to be retrieved. + +Specifies the name of the virtual machine whose network adapters are to be removed. ```yaml Type: String[] @@ -184,6 +202,7 @@ Accept wildcard characters: False ``` ### -Confirm + Prompts you for confirmation before running the cmdlet. ```yaml @@ -199,8 +218,8 @@ Accept wildcard characters: False ``` ### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. + +Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml Type: SwitchParameter @@ -215,7 +234,11 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters). ## INPUTS @@ -230,3 +253,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + +- [Add-VMGpuPartitionAdapter](add-vmgpupartitionadapter.md) + +- [Get-VMGpuPartitionAdapter](get-vmgpupartitionadapter.md) + +- [Set-VMGpuPartitionAdapter](set-vmgpupartitionadapter.md) diff --git a/docset/winserver2025-ps/hyper-v/Set-VMGpuPartitionAdapter.md b/docset/winserver2025-ps/hyper-v/Set-VMGpuPartitionAdapter.md index 42f57e5749..a8ed8872b7 100644 --- a/docset/winserver2025-ps/hyper-v/Set-VMGpuPartitionAdapter.md +++ b/docset/winserver2025-ps/hyper-v/Set-VMGpuPartitionAdapter.md @@ -2,7 +2,7 @@ description: Assigns a partition of a GPU to a virtual machine. external help file: Microsoft.HyperV.PowerShell.Cmdlets.dll-Help.xml Module Name: Hyper-V -ms.date: 09/22/2022 +ms.date: 06/12/2024 online version: https://learn.microsoft.com/powershell/module/hyper-v/set-vmgpupartitionadapter?view=windowsserver2025-ps&wt.mc_id=ps-gethelp schema: 2.0.0 title: Set-VMGpuPartitionAdapter @@ -16,44 +16,51 @@ Assigns a partition of a GPU to a virtual machine. ## SYNTAX ### VMName (Default) + ``` Set-VMGpuPartitionAdapter [-CimSession ] [-ComputerName ] [-Credential ] [-VMName] [-Passthru] [-AdapterId ] [-MinPartitionVRAM ] [-MaxPartitionVRAM ] [-OptimalPartitionVRAM ] [-MinPartitionEncode ] [-MaxPartitionEncode ] [-OptimalPartitionEncode ] [-MinPartitionDecode ] [-MaxPartitionDecode ] [-OptimalPartitionDecode ] - [-MinPartitionCompute ] [-MaxPartitionCompute ] [-OptimalPartitionCompute ] [-WhatIf] - [-Confirm] [] + [-MinPartitionCompute ] [-MaxPartitionCompute ] [-OptimalPartitionCompute ] + [-WhatIf] [-Confirm] [] ``` ### VMObject + ``` Set-VMGpuPartitionAdapter [-VM] [-Passthru] [-AdapterId ] [-MinPartitionVRAM ] [-MaxPartitionVRAM ] [-OptimalPartitionVRAM ] [-MinPartitionEncode ] [-MaxPartitionEncode ] [-OptimalPartitionEncode ] [-MinPartitionDecode ] [-MaxPartitionDecode ] [-OptimalPartitionDecode ] - [-MinPartitionCompute ] [-MaxPartitionCompute ] [-OptimalPartitionCompute ] [-WhatIf] - [-Confirm] [] + [-MinPartitionCompute ] [-MaxPartitionCompute ] [-OptimalPartitionCompute ] + [-WhatIf] [-Confirm] [] ``` ### Object + ``` Set-VMGpuPartitionAdapter [-VMGpuPartitionAdapter] [-Passthru] [-MinPartitionVRAM ] [-MaxPartitionVRAM ] [-OptimalPartitionVRAM ] [-MinPartitionEncode ] [-MaxPartitionEncode ] [-OptimalPartitionEncode ] [-MinPartitionDecode ] [-MaxPartitionDecode ] [-OptimalPartitionDecode ] - [-MinPartitionCompute ] [-MaxPartitionCompute ] [-OptimalPartitionCompute ] [-WhatIf] - [-Confirm] [] + [-MinPartitionCompute ] [-MaxPartitionCompute ] [-OptimalPartitionCompute ] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -The 'Set-VMGpuPartitionAdapter' cmdlet assigns a partition of a GPU to a virtual machine. Running the command against a virtual machine assigns a full partition. Additional parameters exist to assign more specific options to a VM. + +The `Set-VMGpuPartitionAdapter` cmdlet assigns a partition of a GPU to a virtual machine. Running +the command against a virtual machine assigns a full partition. Additional parameters exist to +assign more specific options to a VM. ## EXAMPLES ### Example 1 + ```powershell -$vm = get-vm test +$vm = Get-VM "Test" Set-VMGpuPartitionAdapter -VM $vm ``` @@ -62,6 +69,7 @@ This example assign a partition to a VM passing a VM object. ## PARAMETERS ### -AdapterId + A VM's GPU partition identification number used to display the GPU information assigned to a VM. ```yaml @@ -77,8 +85,11 @@ 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](https://go.microsoft.com/fwlink/p/?LinkId=227967) or [Get-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227966) cmdlet. -The default is the current session on the local computer. + +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](/powershell/module/cimcmdlets/new-cimsession) +or [Get-CimSession](/powershell/module/cimcmdlets/get-cimsession) cmdlet. The default is the +current session on the local computer. ```yaml Type: CimSession[] @@ -93,9 +104,10 @@ 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. + +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. ```yaml Type: String[] @@ -110,8 +122,9 @@ Accept wildcard characters: False ``` ### -Credential -Specifies one or more user accounts that have permission to perform this action. -The default is the current user. + +Specifies one or more user accounts that have permission to perform this action. The default is the +current user. ```yaml Type: PSCredential[] @@ -126,7 +139,9 @@ Accept wildcard characters: False ``` ### -MaxPartitionCompute -The maximum number of compute assigned by the host GPU. This is defined by the manufacturer's driver. + +The maximum number of compute assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -141,7 +156,9 @@ Accept wildcard characters: False ``` ### -MaxPartitionDecode -The maximum number of decoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The maximum number of decoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -156,7 +173,9 @@ Accept wildcard characters: False ``` ### -MaxPartitionEncode -The maximum number of encoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The maximum number of encoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -171,6 +190,7 @@ Accept wildcard characters: False ``` ### -MaxPartitionVRAM + The maximum VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver. ```yaml @@ -186,7 +206,9 @@ Accept wildcard characters: False ``` ### -MinPartitionCompute -The minimum number of compute assigned by the host GPU. This is defined by the manufacturer's driver. + +The minimum number of compute assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -201,7 +223,9 @@ Accept wildcard characters: False ``` ### -MinPartitionDecode -The minimum number of decoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The minimum number of decoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -216,7 +240,9 @@ Accept wildcard characters: False ``` ### -MinPartitionEncode -The minimum number of encoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The minimum number of encoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -231,6 +257,7 @@ Accept wildcard characters: False ``` ### -MinPartitionVRAM + The minimum VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver. ```yaml @@ -246,7 +273,9 @@ Accept wildcard characters: False ``` ### -OptimalPartitionCompute -The optimal number of compute assigned by the host GPU. This is defined by the manufacturer's driver. + +The optimal number of compute assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -261,7 +290,9 @@ Accept wildcard characters: False ``` ### -OptimalPartitionDecode -The optimal number of decoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The optimal number of decoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -276,7 +307,9 @@ Accept wildcard characters: False ``` ### -OptimalPartitionEncode -The optimal number of encoders assigned by the host GPU. This is defined by the manufacturer's driver. + +The optimal number of encoders assigned by the host GPU. This is defined by the manufacturer's +driver. ```yaml Type: UInt64 @@ -291,6 +324,7 @@ Accept wildcard characters: False ``` ### -OptimalPartitionVRAM + The optimal VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver. ```yaml @@ -306,6 +340,7 @@ Accept wildcard characters: False ``` ### -Passthru + Returns an object for each process that the cmdlet started. ```yaml @@ -321,6 +356,7 @@ 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. @@ -338,7 +374,8 @@ Accept wildcard characters: False ``` ### -VMGpuPartitionAdapter -GPU partition object obtained from 'Get-VMGpuPartitionAdapter'. + +GPU partition object obtained from `Get-VMGpuPartitionAdapter`. ```yaml Type: VMGpuPartitionAdapter[] @@ -353,7 +390,8 @@ Accept wildcard characters: False ``` ### -VMName -Specifies the name of the virtual machine whose network adapters are to be retrieved. + +Specifies the name of the virtual machine whose network adapters are to be configured. ```yaml Type: String[] @@ -368,6 +406,7 @@ Accept wildcard characters: False ``` ### -Confirm + Prompts you for confirmation before running the cmdlet. ```yaml @@ -383,8 +422,8 @@ Accept wildcard characters: False ``` ### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. + +Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml Type: SwitchParameter @@ -399,7 +438,11 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, +-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, +-WarningAction, and -WarningVariable. For more information, see +[about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters). ## INPUTS @@ -416,3 +459,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + +- [Add-VMGpuPartitionAdapter](add-vmgpupartitionadapter.md) + +- [Get-VMGpuPartitionAdapter](get-vmgpupartitionadapter.md) + +- [Remove-VMGpuPartitionAdapter](remove-vmgpupartitionadapter.md)