Modifying the settings of virtual machines

To modify the settings of a virtual machine, you can use the Set-VM cmdlet. This cmdlet has the following syntax. The first parameter set is the default:

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

The second parameter set is for reverting ...

Get Learning PowerCLI - Second Edition 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.