Stop-VMGuest

This cmdlet issues a command to the guest operating system asking it to prepare for a shutdown operation. Returns immediately and does not wait for the guest operating system to complete the operation.

Syntax

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

Parameters

Required Parameter Name Type Position Features Description
optional
Server
VIServer[] 1
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.
    optional
    VM
    VirtualMachine[] named
  • wildcards
  • pipeline
  • Specifies the virtual machines whose operating systems you want to shut down. The virtual machines must have VMware Tools installed.

    [-Guest  <VMGuest[]>]
    [CommonParameters]

    Parameters

    Required Parameter Name Type Position Features Description
    optional
    Guest
    VMGuest[] named
  • pipeline
  • Specifies the virtual machine guests you want to shut down.

    Output

    VMware.VimAutomation.ViCore.Types.V1.VM.Guest.VMGuest

    Examples


    Example 1

    Get-VM VM | Stop-VMGuest

    Shuts down the guest OS of the virtual machine named VM.

    Related Commands

    Feedback

    Was this page helpful?