Skip to content

Commit d0cfe20

Browse files
LolaOysdwheeler
authored andcommitted
Adding GPU-P powershell commands to WS powershell doc
1 parent 2d064c2 commit d0cfe20

File tree

6 files changed

+1367
-0
lines changed

6 files changed

+1367
-0
lines changed
Lines changed: 398 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,398 @@
1+
---
2+
description: Add GPU Partition adapter to a virtual machine
3+
external help file: Microsoft.HyperV.PowerShell.Cmdlets.dll-Help.xml
4+
Module Name: Hyper-V
5+
ms.date: 09/22/2022
6+
online version: https://learn.microsoft.com/en-us/powershell/module/hyper-v/add-vmgpupartitionadapter?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
7+
schema: 2.0.0
8+
---
9+
10+
# Add-VMGpuPartitionAdapter
11+
12+
## SYNOPSIS
13+
Add GPU Partition adapter to a virtual machine
14+
15+
## SYNTAX
16+
17+
### VMName (Default)
18+
```
19+
Add-VMGpuPartitionAdapter [-CimSession <CimSession[]>] [-ComputerName <String[]>]
20+
[-Credential <PSCredential[]>] [-VMName] <String[]> [-Passthru] [-InstancePath <String>]
21+
[-MinPartitionVRAM <UInt64>] [-MaxPartitionVRAM <UInt64>] [-OptimalPartitionVRAM <UInt64>]
22+
[-MinPartitionEncode <UInt64>] [-MaxPartitionEncode <UInt64>] [-OptimalPartitionEncode <UInt64>]
23+
[-MinPartitionDecode <UInt64>] [-MaxPartitionDecode <UInt64>] [-OptimalPartitionDecode <UInt64>]
24+
[-MinPartitionCompute <UInt64>] [-MaxPartitionCompute <UInt64>] [-OptimalPartitionCompute <UInt64>] [-WhatIf]
25+
[-Confirm] [<CommonParameters>]
26+
```
27+
28+
### VMObject
29+
```
30+
Add-VMGpuPartitionAdapter [-VM] <VirtualMachine[]> [-Passthru] [-InstancePath <String>]
31+
[-MinPartitionVRAM <UInt64>] [-MaxPartitionVRAM <UInt64>] [-OptimalPartitionVRAM <UInt64>]
32+
[-MinPartitionEncode <UInt64>] [-MaxPartitionEncode <UInt64>] [-OptimalPartitionEncode <UInt64>]
33+
[-MinPartitionDecode <UInt64>] [-MaxPartitionDecode <UInt64>] [-OptimalPartitionDecode <UInt64>]
34+
[-MinPartitionCompute <UInt64>] [-MaxPartitionCompute <UInt64>] [-OptimalPartitionCompute <UInt64>] [-WhatIf]
35+
[-Confirm] [<CommonParameters>]
36+
```
37+
38+
## DESCRIPTION
39+
The **Add-VMGpuPartitionAdapter** cmdlet adds GPU Partition adapter to a virtual machine. With no parameter, it assigns a Full partition from an assignable GPU to a VM.
40+
41+
## EXAMPLES
42+
43+
### Example 1
44+
```powershell
45+
PS C:\> $vm = Get-VM -name "TestVM"
46+
Add-VMGpuPartitionAdapter -VM $vm
47+
```
48+
49+
Assign a partition to a specific VM object. If you want to assign multiple GPU partitions run this command the number of times equal to the number of GPU partitions needed
50+
51+
### Example 2
52+
```powershell
53+
PS C:\> $vm = Get-VM -name "TestVM"
54+
Add-VMGpuPartitionAdapter -VM $vm -Instancepath "SampleGPUInstancePath"
55+
```
56+
57+
Assign a partition from a specific GPU to a VM. Where the instance path is the GPU device ID name on the Host
58+
59+
## PARAMETERS
60+
61+
### -CimSession
62+
Runs the cmdlet in a remote session or on a remote computer.
63+
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.
64+
The default is the current session on the local computer.
65+
66+
```yaml
67+
Type: CimSession[]
68+
Parameter Sets: VMName
69+
Aliases:
70+
71+
Required: False
72+
Position: Named
73+
Default value: None
74+
Accept pipeline input: False
75+
Accept wildcard characters: False
76+
```
77+
78+
### -ComputerName
79+
Specifies one or more Hyper-V hosts from which virtual machines are to be retrieved.
80+
NetBIOS names, IP addresses, and fully qualified domain names are allowable.
81+
The default is the local computer.
82+
Use localhost or a dot (.) to specify the local computer explicitly.
83+
84+
```yaml
85+
Type: String[]
86+
Parameter Sets: VMName
87+
Aliases:
88+
89+
Required: False
90+
Position: Named
91+
Default value: None
92+
Accept pipeline input: False
93+
Accept wildcard characters: False
94+
```
95+
96+
### -Credential
97+
Specifies one or more user accounts that have permission to perform this action.
98+
The default is the current user.
99+
100+
```yaml
101+
Type: PSCredential[]
102+
Parameter Sets: VMName
103+
Aliases:
104+
105+
Required: False
106+
Position: Named
107+
Default value: None
108+
Accept pipeline input: False
109+
Accept wildcard characters: False
110+
```
111+
112+
### -InstancePath
113+
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
114+
115+
```yaml
116+
Type: String
117+
Parameter Sets: (All)
118+
Aliases:
119+
120+
Required: False
121+
Position: Named
122+
Default value: None
123+
Accept pipeline input: False
124+
Accept wildcard characters: False
125+
```
126+
127+
### -MaxPartitionCompute
128+
Maximum number of compute assigned by the Host GPU. This is defined by the manufacturer driver.
129+
130+
```yaml
131+
Type: UInt64
132+
Parameter Sets: (All)
133+
Aliases:
134+
135+
Required: False
136+
Position: Named
137+
Default value: None
138+
Accept pipeline input: False
139+
Accept wildcard characters: False
140+
```
141+
142+
### -MaxPartitionDecode
143+
Maximum number of decoders assigned by the Host GPU. This is defined by the manufacturer driver.
144+
145+
```yaml
146+
Type: UInt64
147+
Parameter Sets: (All)
148+
Aliases:
149+
150+
Required: False
151+
Position: Named
152+
Default value: None
153+
Accept pipeline input: False
154+
Accept wildcard characters: False
155+
```
156+
157+
### -MaxPartitionEncode
158+
Maximum number of encoders assigned by the Host GPU. This is defined by the manufacturer driver.
159+
160+
```yaml
161+
Type: UInt64
162+
Parameter Sets: (All)
163+
Aliases:
164+
165+
Required: False
166+
Position: Named
167+
Default value: None
168+
Accept pipeline input: False
169+
Accept wildcard characters: False
170+
```
171+
172+
### -MaxPartitionVRAM
173+
Maximum VRAM supported by the Host GPU. This is defined by the manufacturer driver.
174+
175+
```yaml
176+
Type: UInt64
177+
Parameter Sets: (All)
178+
Aliases:
179+
180+
Required: False
181+
Position: Named
182+
Default value: None
183+
Accept pipeline input: False
184+
Accept wildcard characters: False
185+
```
186+
187+
### -MinPartitionCompute
188+
Minimum number of compute assigned by the Host GPU. This is defined by the manufacturer driver.
189+
190+
```yaml
191+
Type: UInt64
192+
Parameter Sets: (All)
193+
Aliases:
194+
195+
Required: False
196+
Position: Named
197+
Default value: None
198+
Accept pipeline input: False
199+
Accept wildcard characters: False
200+
```
201+
202+
### -MinPartitionDecode
203+
Minimum number of decoders assigned by the Host GPU. This is defined by the manufacturer driver.
204+
205+
```yaml
206+
Type: UInt64
207+
Parameter Sets: (All)
208+
Aliases:
209+
210+
Required: False
211+
Position: Named
212+
Default value: None
213+
Accept pipeline input: False
214+
Accept wildcard characters: False
215+
```
216+
217+
### -MinPartitionEncode
218+
Minimum number of encoders assigned by the Host GPU. This is defined by the manufacturer driver.
219+
220+
```yaml
221+
Type: UInt64
222+
Parameter Sets: (All)
223+
Aliases:
224+
225+
Required: False
226+
Position: Named
227+
Default value: None
228+
Accept pipeline input: False
229+
Accept wildcard characters: False
230+
```
231+
232+
### -MinPartitionVRAM
233+
Minimum VRAM supported by the Host GPU. This is defined by the manufacturer driver.
234+
235+
```yaml
236+
Type: UInt64
237+
Parameter Sets: (All)
238+
Aliases:
239+
240+
Required: False
241+
Position: Named
242+
Default value: None
243+
Accept pipeline input: False
244+
Accept wildcard characters: False
245+
```
246+
247+
### -OptimalPartitionCompute
248+
Optimal number of compute assigned by the Host GPU. This is defined by the manufacturer driver.
249+
250+
```yaml
251+
Type: UInt64
252+
Parameter Sets: (All)
253+
Aliases:
254+
255+
Required: False
256+
Position: Named
257+
Default value: None
258+
Accept pipeline input: False
259+
Accept wildcard characters: False
260+
```
261+
262+
### -OptimalPartitionDecode
263+
Optimal number of decoders assigned by the Host GPU. This is defined by the manufacturer driver.
264+
265+
```yaml
266+
Type: UInt64
267+
Parameter Sets: (All)
268+
Aliases:
269+
270+
Required: False
271+
Position: Named
272+
Default value: None
273+
Accept pipeline input: False
274+
Accept wildcard characters: False
275+
```
276+
277+
### -OptimalPartitionEncode
278+
Optimal number of encoders assigned by the Host GPU. This is defined by the manufacturer driver.
279+
280+
```yaml
281+
Type: UInt64
282+
Parameter Sets: (All)
283+
Aliases:
284+
285+
Required: False
286+
Position: Named
287+
Default value: None
288+
Accept pipeline input: False
289+
Accept wildcard characters: False
290+
```
291+
292+
### -OptimalPartitionVRAM
293+
Optimal VRAM supported by the Host GPU. This is defined by the manufacturer driver.
294+
295+
```yaml
296+
Type: UInt64
297+
Parameter Sets: (All)
298+
Aliases:
299+
300+
Required: False
301+
Position: Named
302+
Default value: None
303+
Accept pipeline input: False
304+
Accept wildcard characters: False
305+
```
306+
307+
### -Passthru
308+
Returns an object for each process that the cmdlet started.
309+
310+
```yaml
311+
Type: SwitchParameter
312+
Parameter Sets: (All)
313+
Aliases:
314+
315+
Required: False
316+
Position: Named
317+
Default value: None
318+
Accept pipeline input: False
319+
Accept wildcard characters: False
320+
```
321+
322+
### -VM
323+
Specifies the virtual machine on which the network adapter is to be added.
324+
325+
```yaml
326+
Type: VirtualMachine[]
327+
Parameter Sets: VMObject
328+
Aliases:
329+
330+
Required: True
331+
Position: 0
332+
Default value: None
333+
Accept pipeline input: True (ByValue)
334+
Accept wildcard characters: False
335+
```
336+
337+
### -VMName
338+
Specifies the name of the virtual machine on which the network adapter is to be added.
339+
340+
```yaml
341+
Type: String[]
342+
Parameter Sets: VMName
343+
Aliases:
344+
345+
Required: True
346+
Position: 0
347+
Default value: None
348+
Accept pipeline input: True (ByValue)
349+
Accept wildcard characters: False
350+
```
351+
352+
### -Confirm
353+
Prompts you for confirmation before running the cmdlet.
354+
355+
```yaml
356+
Type: SwitchParameter
357+
Parameter Sets: (All)
358+
Aliases: cf
359+
360+
Required: False
361+
Position: Named
362+
Default value: None
363+
Accept pipeline input: False
364+
Accept wildcard characters: False
365+
```
366+
367+
### -WhatIf
368+
Shows what would happen if the cmdlet runs.
369+
The cmdlet is not run.
370+
371+
```yaml
372+
Type: SwitchParameter
373+
Parameter Sets: (All)
374+
Aliases: wi
375+
376+
Required: False
377+
Position: Named
378+
Default value: None
379+
Accept pipeline input: False
380+
Accept wildcard characters: False
381+
```
382+
383+
### CommonParameters
384+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
385+
386+
## INPUTS
387+
388+
### Microsoft.HyperV.PowerShell.VirtualMachine[]
389+
390+
### System.String[]
391+
392+
## OUTPUTS
393+
394+
### Microsoft.HyperV.PowerShell.VMGpuPartitionAdapter
395+
396+
## NOTES
397+
398+
## RELATED LINKS

0 commit comments

Comments
 (0)