Modifying the settings of a virtual machine

To modify the settings of a virtual machine, you can use the Set-VM cmdlet. This cmdlet has the following syntax:

Set-VM [-VM] <VirtualMachine[]> [-Name <String>] [-Version <VMVersion>] [-MemoryMB <Int64>] [-MemoryGB <Decimal>] [-NumCpu <Int32>] [-GuestId <String>] [-AlternateGuestName <String>] [-OSCustomizationSpec <OSCustomizationSpec>] [-HARestartPriority <HARestartPriority>] [-HAIsolationResponse <HAIsolationResponse>] [-DrsAutomationLevel <DrsAutomationLevel>] [-Server <VIServer[]>] [-RunAsync] [-VMSwapFilePolicy <VMSwapfilePolicy>] [-Notes <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Set-VM [-VM] <VirtualMachine[]> [-Name <String>] [-Snapshot <Snapshot>] [-OSCustomizationSpec <OSCustomizationSpec>] ...

Get Learning PowerCLI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.