Editar

Compartilhar via


Add-VMGpuPartitionAdapter

Adds a GPU partition adapter to a virtual machine.

Syntax

VMName (Default)

Add-VMGpuPartitionAdapter
    [-VMName] <String[]>
    [-CimSession <CimSession[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential[]>]
    [-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>]

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>]

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.

Examples

Example 1

$vm = Get-VM -Name "TestVM"
Add-VMGpuPartitionAdapter -VM $vm

This example assigns a partition to a specific VM object.

Example 2

$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.

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 or Get-CimSession cmdlet. The default is the current session on the local computer.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Credential

Specifies one or more user accounts that have permission to perform this action. The default is the current user.

Parameter properties

Type:

PSCredential[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxPartitionCompute

The maximum number of compute assigned by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxPartitionDecode

The maximum number of decoders assigned by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxPartitionEncode

The maximum number of encoders assigned by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MaxPartitionVRAM

The maximum VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MinPartitionCompute

The minimum number of compute assigned by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MinPartitionDecode

The minimum number of decoders assigned by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MinPartitionEncode

The minimum number of encoders assigned by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MinPartitionVRAM

The minimum VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OptimalPartitionCompute

The optimal number of compute assigned by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OptimalPartitionDecode

The optimal number of decoders assigned by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OptimalPartitionEncode

The optimal number of encoders assigned by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-OptimalPartitionVRAM

The optimal VRAM in bytes supported by the host GPU. This is defined by the manufacturer's driver.

Parameter properties

Type:UInt64
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Passthru

Returns an object for each process that the cmdlet started.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-VM

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

Parameter properties

Type:

VirtualMachine[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMObject
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-VMName

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

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

VMName
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

Microsoft.HyperV.PowerShell.VirtualMachine

String

Outputs

Microsoft.HyperV.PowerShell.VMGpuPartitionAdapter