Skip to content

Commit adad7bc

Browse files
committed
Updated VMGpuPartitionAdapter command set
1 parent c508114 commit adad7bc

File tree

4 files changed

+238
-94
lines changed

4 files changed

+238
-94
lines changed

docset/winserver2022-ps/hyper-v/Add-VMGpuPartitionAdapter.md

Lines changed: 76 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Adds a GPU partition adapter to a virtual machine.
33
external help file: Microsoft.HyperV.PowerShell.Cmdlets.dll-Help.xml
44
Module Name: Hyper-V
5-
ms.date: 09/22/2022
5+
ms.date: 06/12/2024
66
online version: https://learn.microsoft.com/powershell/module/hyper-v/add-vmgpupartitionadapter?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Add-VMGpuPartitionAdapter
@@ -16,53 +16,59 @@ Adds a GPU partition adapter to a virtual machine.
1616
## SYNTAX
1717

1818
### VMName (Default)
19+
1920
```
2021
Add-VMGpuPartitionAdapter [-CimSession <CimSession[]>] [-ComputerName <String[]>]
2122
[-Credential <PSCredential[]>] [-VMName] <String[]> [-Passthru] [-InstancePath <String>]
2223
[-MinPartitionVRAM <UInt64>] [-MaxPartitionVRAM <UInt64>] [-OptimalPartitionVRAM <UInt64>]
2324
[-MinPartitionEncode <UInt64>] [-MaxPartitionEncode <UInt64>] [-OptimalPartitionEncode <UInt64>]
2425
[-MinPartitionDecode <UInt64>] [-MaxPartitionDecode <UInt64>] [-OptimalPartitionDecode <UInt64>]
25-
[-MinPartitionCompute <UInt64>] [-MaxPartitionCompute <UInt64>] [-OptimalPartitionCompute <UInt64>] [-WhatIf]
26-
[-Confirm] [<CommonParameters>]
26+
[-MinPartitionCompute <UInt64>] [-MaxPartitionCompute <UInt64>] [-OptimalPartitionCompute <UInt64>] [-WhatIf] [-Confirm] [<CommonParameters>]
2727
```
2828

2929
### VMObject
30+
3031
```
3132
Add-VMGpuPartitionAdapter [-VM] <VirtualMachine[]> [-Passthru] [-InstancePath <String>]
3233
[-MinPartitionVRAM <UInt64>] [-MaxPartitionVRAM <UInt64>] [-OptimalPartitionVRAM <UInt64>]
3334
[-MinPartitionEncode <UInt64>] [-MaxPartitionEncode <UInt64>] [-OptimalPartitionEncode <UInt64>]
3435
[-MinPartitionDecode <UInt64>] [-MaxPartitionDecode <UInt64>] [-OptimalPartitionDecode <UInt64>]
35-
[-MinPartitionCompute <UInt64>] [-MaxPartitionCompute <UInt64>] [-OptimalPartitionCompute <UInt64>] [-WhatIf]
36-
[-Confirm] [<CommonParameters>]
36+
[-MinPartitionCompute <UInt64>] [-MaxPartitionCompute <UInt64>] [-OptimalPartitionCompute <UInt64>] [-WhatIf] [-Confirm] [<CommonParameters>]
3737
```
3838

3939
## DESCRIPTION
40-
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.
40+
41+
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.
4142

4243
## EXAMPLES
4344

4445
### Example 1
46+
4547
```powershell
46-
$vm = Get-VM -name "TestVM"
48+
$vm = Get-VM -Name "TestVM"
4749
Add-VMGpuPartitionAdapter -VM $vm
4850
```
4951

5052
This example assigns a partition to a specific VM object.
5153

5254
### Example 2
55+
5356
```powershell
54-
$vm = Get-VM -name "TestVM"
55-
Add-VMGpuPartitionAdapter -VM $vm -Instancepath "SampleGPUInstancePath"
57+
$vm = Get-VM -Name "TestVM"
58+
Add-VMGpuPartitionAdapter -VM $vm -InstancePath "GPUInstancePath"
5659
```
5760

58-
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.
61+
This example assigns a partition from a specific GPU to a VM where the instance path is the GPU
62+
device ID name on the host.
5963

6064
## PARAMETERS
6165

6266
### -CimSession
63-
Runs the cmdlet in a remote session or on a remote computer.
64-
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.
65-
The default is the current session on the local computer.
67+
68+
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session
69+
object, such as the output of a [New-CimSession](/powershell/module/cimcmdlets/new-cimsession)
70+
or [Get-CimSession](/powershell/module/cimcmdlets/get-cimsession) cmdlet. The default is the
71+
current session on the local computer.
6672

6773
```yaml
6874
Type: CimSession[]
@@ -77,10 +83,10 @@ Accept wildcard characters: False
7783
```
7884
7985
### -ComputerName
80-
Specifies one or more Hyper-V hosts from which virtual machines are to be retrieved.
81-
NetBIOS names, IP addresses, and fully qualified domain names are allowable.
82-
The default is the local computer.
83-
Use localhost or a dot ('.') to specify the local computer explicitly.
86+
87+
Specifies one or more Hyper-V hosts from which virtual machines are to be retrieved. NetBIOS names,
88+
IP addresses, and fully qualified domain names are allowable. The default is the local computer.
89+
Use localhost or a dot (`.`) to specify the local computer explicitly.
8490

8591
```yaml
8692
Type: String[]
@@ -95,8 +101,9 @@ Accept wildcard characters: False
95101
```
96102

97103
### -Credential
98-
Specifies one or more user accounts that have permission to perform this action.
99-
The default is the current user.
104+
105+
Specifies one or more user accounts that have permission to perform this action. The default is the
106+
current user.
100107

101108
```yaml
102109
Type: PSCredential[]
@@ -111,7 +118,9 @@ Accept wildcard characters: False
111118
```
112119

113120
### -InstancePath
114-
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'.
121+
122+
Represents the Device Instance path of a GPU in the host. This value can be obtained from the
123+
"Name" property of the command `Get-VMHostPartitionableGpu`.
115124

116125
```yaml
117126
Type: String
@@ -126,7 +135,9 @@ Accept wildcard characters: False
126135
```
127136

128137
### -MaxPartitionCompute
129-
The maximum number of compute assigned by the host GPU. This is defined by the manufacturer's driver.
138+
139+
The maximum number of compute assigned by the host GPU. This is defined by the manufacturer's
140+
driver.
130141

131142
```yaml
132143
Type: UInt64
@@ -141,7 +152,9 @@ Accept wildcard characters: False
141152
```
142153

143154
### -MaxPartitionDecode
144-
The maximum number of decoders assigned by the host GPU. This is defined by the manufacturer's driver.
155+
156+
The maximum number of decoders assigned by the host GPU. This is defined by the manufacturer's
157+
driver.
145158

146159
```yaml
147160
Type: UInt64
@@ -156,7 +169,9 @@ Accept wildcard characters: False
156169
```
157170

158171
### -MaxPartitionEncode
159-
The maximum number of encoders assigned by the host GPU. This is defined by the manufacturer's driver.
172+
173+
The maximum number of encoders assigned by the host GPU. This is defined by the manufacturer's
174+
driver.
160175

161176
```yaml
162177
Type: UInt64
@@ -171,6 +186,7 @@ Accept wildcard characters: False
171186
```
172187

173188
### -MaxPartitionVRAM
189+
174190
The maximum VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver.
175191

176192
```yaml
@@ -186,7 +202,9 @@ Accept wildcard characters: False
186202
```
187203

188204
### -MinPartitionCompute
189-
The minimum number of compute assigned by the host GPU. This is defined by the manufacturer's driver.
205+
206+
The minimum number of compute assigned by the host GPU. This is defined by the manufacturer's
207+
driver.
190208

191209
```yaml
192210
Type: UInt64
@@ -201,7 +219,9 @@ Accept wildcard characters: False
201219
```
202220

203221
### -MinPartitionDecode
204-
The minimum number of decoders assigned by the host GPU. This is defined by the manufacturer's driver.
222+
223+
The minimum number of decoders assigned by the host GPU. This is defined by the manufacturer's
224+
driver.
205225

206226
```yaml
207227
Type: UInt64
@@ -216,7 +236,9 @@ Accept wildcard characters: False
216236
```
217237

218238
### -MinPartitionEncode
219-
The minimum number of encoders assigned by the host GPU. This is defined by the manufacturer's driver.
239+
240+
The minimum number of encoders assigned by the host GPU. This is defined by the manufacturer's
241+
driver.
220242

221243
```yaml
222244
Type: UInt64
@@ -231,6 +253,7 @@ Accept wildcard characters: False
231253
```
232254

233255
### -MinPartitionVRAM
256+
234257
The minimum VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver.
235258

236259
```yaml
@@ -246,7 +269,9 @@ Accept wildcard characters: False
246269
```
247270

248271
### -OptimalPartitionCompute
249-
The optimal number of compute assigned by the host GPU. This is defined by the manufacturer's driver.
272+
273+
The optimal number of compute assigned by the host GPU. This is defined by the manufacturer's
274+
driver.
250275

251276
```yaml
252277
Type: UInt64
@@ -261,7 +286,9 @@ Accept wildcard characters: False
261286
```
262287

263288
### -OptimalPartitionDecode
264-
The optimal number of decoders assigned by the host GPU. This is defined by the manufacturer's driver.
289+
290+
The optimal number of decoders assigned by the host GPU. This is defined by the manufacturer's
291+
driver.
265292

266293
```yaml
267294
Type: UInt64
@@ -276,7 +303,9 @@ Accept wildcard characters: False
276303
```
277304

278305
### -OptimalPartitionEncode
279-
The optimal number of encoders assigned by the host GPU. This is defined by the manufacturer's driver.
306+
307+
The optimal number of encoders assigned by the host GPU. This is defined by the manufacturer's
308+
driver.
280309

281310
```yaml
282311
Type: UInt64
@@ -291,6 +320,7 @@ Accept wildcard characters: False
291320
```
292321

293322
### -OptimalPartitionVRAM
323+
294324
The optimal VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver.
295325

296326
```yaml
@@ -306,6 +336,7 @@ Accept wildcard characters: False
306336
```
307337

308338
### -Passthru
339+
309340
Returns an object for each process that the cmdlet started.
310341

311342
```yaml
@@ -321,6 +352,7 @@ Accept wildcard characters: False
321352
```
322353

323354
### -VM
355+
324356
Specifies the virtual machine on which the network adapter is to be added.
325357

326358
```yaml
@@ -336,6 +368,7 @@ Accept wildcard characters: False
336368
```
337369

338370
### -VMName
371+
339372
Specifies the name of the virtual machine on which the network adapter is to be added.
340373

341374
```yaml
@@ -351,6 +384,7 @@ Accept wildcard characters: False
351384
```
352385

353386
### -Confirm
387+
354388
Prompts you for confirmation before running the cmdlet.
355389

356390
```yaml
@@ -366,8 +400,8 @@ Accept wildcard characters: False
366400
```
367401

368402
### -WhatIf
369-
Shows what would happen if the cmdlet runs.
370-
The cmdlet is not run.
403+
404+
Shows what would happen if the cmdlet runs. The cmdlet is not run.
371405

372406
```yaml
373407
Type: SwitchParameter
@@ -382,7 +416,11 @@ Accept wildcard characters: False
382416
```
383417

384418
### CommonParameters
385-
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).
419+
420+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
421+
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
422+
-WarningAction, and -WarningVariable. For more information, see
423+
[about_CommonParameters](/powershell/module/microsoft.powershell.core/about/about_commonparameters).
386424

387425
## INPUTS
388426

@@ -397,3 +435,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
397435
## NOTES
398436

399437
## RELATED LINKS
438+
439+
- [Get-VMGpuPartitionAdapter](get-vmgpupartitionadapter.md)
440+
441+
- [Remove-VMGpuPartitionAdapter](remove-vmgpupartitionadapter.md)
442+
443+
- [Set-VMGpuPartitionAdapter](set-vmgpupartitionadapter.md)

0 commit comments

Comments
 (0)