Skip to content

Commit

Permalink
Merge branch 'main' into update_vmhostassdev
Browse files Browse the repository at this point in the history
  • Loading branch information
Xelu86 committed Jul 9, 2024
2 parents c11ed4b + 559f93f commit 2510929
Show file tree
Hide file tree
Showing 4 changed files with 257 additions and 96 deletions.
111 changes: 79 additions & 32 deletions docset/winserver2025-ps/hyper-v/Add-VMGpuPartitionAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,53 +16,62 @@ Adds a GPU partition adapter to a virtual machine.
## SYNTAX

### VMName (Default)

```
Add-VMGpuPartitionAdapter [-CimSession <CimSession[]>] [-ComputerName <String[]>]
[-Credential <PSCredential[]>] [-VMName] <String[]> [-Passthru] [-InstancePath <String>]
[-MinPartitionVRAM <UInt64>] [-MaxPartitionVRAM <UInt64>] [-OptimalPartitionVRAM <UInt64>]
[-MinPartitionEncode <UInt64>] [-MaxPartitionEncode <UInt64>] [-OptimalPartitionEncode <UInt64>]
[-MinPartitionDecode <UInt64>] [-MaxPartitionDecode <UInt64>] [-OptimalPartitionDecode <UInt64>]
[-MinPartitionCompute <UInt64>] [-MaxPartitionCompute <UInt64>] [-OptimalPartitionCompute <UInt64>] [-WhatIf]
[-Confirm] [<CommonParameters>]
[-MinPartitionCompute <UInt64>] [-MaxPartitionCompute <UInt64>] [-OptimalPartitionCompute <UInt64>]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

### VMObject

```
Add-VMGpuPartitionAdapter [-VM] <VirtualMachine[]> [-Passthru] [-InstancePath <String>]
[-MinPartitionVRAM <UInt64>] [-MaxPartitionVRAM <UInt64>] [-OptimalPartitionVRAM <UInt64>]
[-MinPartitionEncode <UInt64>] [-MaxPartitionEncode <UInt64>] [-OptimalPartitionEncode <UInt64>]
[-MinPartitionDecode <UInt64>] [-MaxPartitionDecode <UInt64>] [-OptimalPartitionDecode <UInt64>]
[-MinPartitionCompute <UInt64>] [-MaxPartitionCompute <UInt64>] [-OptimalPartitionCompute <UInt64>] [-WhatIf]
[-Confirm] [<CommonParameters>]
[-MinPartitionCompute <UInt64>] [-MaxPartitionCompute <UInt64>] [-OptimalPartitionCompute <UInt64>]
[-WhatIf] [-Confirm] [<CommonParameters>]
```

## 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[]
Expand All @@ -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[]
Expand All @@ -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[]
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -306,6 +339,7 @@ Accept wildcard characters: False
```

### -Passthru

Returns an object for each process that the cmdlet started.

```yaml
Expand All @@ -321,6 +355,7 @@ Accept wildcard characters: False
```

### -VM

Specifies the virtual machine on which the network adapter is to be added.

```yaml
Expand All @@ -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
Expand All @@ -351,6 +387,7 @@ Accept wildcard characters: False
```

### -Confirm

Prompts you for confirmation before running the cmdlet.

```yaml
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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)
Loading

0 comments on commit 2510929

Please sign in to comment.