Set-VMMemory
Configures the memory of a virtual machine.
Set-VMMemory
[-VMName] <String[]>
[-Buffer <Int32>]
[-ComputerName <String[]>]
[-DynamicMemoryEnabled <Boolean>]
[-MaximumAmountPerNumaNodeBytes <Int64>]
[-MaximumBytes <Int64>]
[-MinimumBytes <Int64>]
[-Passthru]
[-Priority <Int32>]
[-ResourcePoolName <String>]
[-StartupBytes <Int64>]
Set-VMMemory
[-VM] <VirtualMachine[]>
[-Buffer <Int32>]
[-DynamicMemoryEnabled <Boolean>]
[-MaximumAmountPerNumaNodeBytes <Int64>]
[-MaximumBytes <Int64>]
[-MinimumBytes <Int64>]
[-Passthru]
[-Priority <Int32>]
[-ResourcePoolName <String>]
[-StartupBytes <Int64>]
Set-VMMemory
[-VMMemory] <VMMemory[]>
[-Buffer <Int32>]
[-DynamicMemoryEnabled <Boolean>]
[-MaximumAmountPerNumaNodeBytes <Int64>]
[-MaximumBytes <Int64>]
[-MinimumBytes <Int64>]
[-Passthru]
[-Priority <Int32>]
[-ResourcePoolName <String>]
[-StartupBytes <Int64>]
The Set-VMMemory cmdlet configures the memory of a virtual machine.
PS C:\>Set-VMMemory TestVM -DynamicMemoryEnabled $true -MinimumBytes 64MB -StartupBytes 256MB -MaximumBytes 2GB -Priority 80 -Buffer 25
Enables dynamic memory on virtual machine TestVM, sets its minimum, startup, and maximum memory, its memory priority, and its buffer.
Specifies the percentage of memory to reserve as a buffer in the virtual machine to be configured. Allowed values range from 5 to 2000.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies one or more Hyper-V hosts on which the memory of a virtual machine is to be configured. 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.
Type: | String[] |
Position: | Named |
Default value: | . |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies whether dynamic memory is to be enabled on the virtual machine to be configured.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the maximum amount of memory per NUMA node in the virtual machine to be configured.
Type: | Int64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the maximum amount of memory to be used by a virtual machine which has dynamic memory enabled.
Type: | Int64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the minimum amount of memory to be used by a virtual machine which has dynamic memory enabled.
Type: | Int64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies that a Microsoft.Virtualization.Powershell.Memory object is to be passed through to the pipeline representing the virtual machine memory to be configured.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Sets the priority for memory availability to this virtual machine relative to other virtual machines on the virtual machine host. Allowed values range from 0 to 100.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the name of the memory resource pool for this virtual machine.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the initial amount of memory to be assigned to a virtual machine with dynamic memory enabled, or the total amount of memory to be assigned to a virtual machine with dynamic memory disabled.
Type: | Int64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the virtual machine whose memory is to be configured.
Type: | VirtualMachine[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the virtual machine memory to be configured.
Type: | VMMemory[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Specifies the name of the virtual machine whose memory is to be configured.
Type: | String[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | True |
None
Default
Microsoft.Virtualization.Powershell.Memory
If -PassThru is specified.