PowerShell Logo Small

Set-VM



This is the built-in help made by Microsoft for the command 'Set-VM', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Configures a virtual machine.

SYNTAX


Set-VM [-Name] <String[]> [-AllowUnverifiedPaths] [-AutomaticStartAction <StartAction>] [-AutomaticStartDelay <Int32>] [-AutomaticStopAction
<StopAction>] [-ComputerName <String[]>] [-DynamicMemory] [-MemoryMaximumBytes <Int64>] [-MemoryMinimumBytes <Int64>] [-MemoryStartupBytes
<Int64>] [-NewVMName <String>] [-Notes <String>] [-Passthru] [-ProcessorCount <Int64>] [-SmartPagingFilePath <String>] [-SnapshotFileLocation
<String>] [-StaticMemory] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-VM [-VM] <VirtualMachine[]> [-AllowUnverifiedPaths] [-AutomaticStartAction <StartAction>] [-AutomaticStartDelay <Int32>]
[-AutomaticStopAction <StopAction>] [-DynamicMemory] [-MemoryMaximumBytes <Int64>] [-MemoryMinimumBytes <Int64>] [-MemoryStartupBytes <Int64>]
[-NewVMName <String>] [-Notes <String>] [-Passthru] [-ProcessorCount <Int64>] [-SmartPagingFilePath <String>] [-SnapshotFileLocation <String>]
[-StaticMemory] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Set-VM cmdlet configures a virtual machine.



<

RELATED LINKS






REMARKS

<

Examples


Example 1

PS C:\>Set-VM –Name TestVM –AutomaticStopAction Shutdown



Configures virtual machine TestVM to shut down when the Hyper-V host shuts down.




Example 2

PS C:\>Stop-VM -Name TestVM -Passthru | Set-VM -ProcessorCount 2 -DynamicMemory -MemoryMaximumBytes 2GB -Passthru | Start-VM



Stops virtual machine TestVM, sets it to use dynamic memory, sets its maximum amount of memory to 2GB, sets it to use 2 virtual processors,
and starts it.