Unlock-VM

This cmdlet unlocks the specified virtual machine. The virtual machine should be encrypted, otherwise, this cmdlet would fail. If the virtual machine is in CryptoLocked state, this cmdlet will make the virtual machine become connected state.

Syntax

-VM  <VirtualMachine[]>
[-RunAsync]
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VM
VirtualMachine[] named
  • wildcards
  • pipeline
  • Specifies the virtual machine that you want to unlock.
    optional
    RunAsync
    SwitchParameter named Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter, run "help About_RunAsync" in the VMware PowerCLI console.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the connected viserver on which you want to run the cmdlet. If no value is passed to this parameter, the command runs on the default viservers. For more information about default viservers, see the description of the Connect-VIServer cmdlet.

    Output

    VMware.VimAutomation.ViCore.Types.V1.Inventory.VirtualMachine

    Examples


    Example 1

    Get-VM 'MyVM' | Unlock-VM

    Unlocks the virtual machine named 'MyVM'.

    Related Commands

    Feedback

    Was this page helpful?