< Back
Stop-VsphereVm
Post
NAME Stop-VsphereVm
SYNOPSIS
Stops a running VM.
SYNTAX
Stop-VsphereVm -InputObject <PSObject[]> [-ShutdownGuestOs <Boolean>] [-WaitForVmPoweredOff <Boolean>]
[-TimeoutSeconds <UInt32>] -Connection <Hashtable> [<CommonParameters>]
Stop-VsphereVm -VmId <String[]> [-ShutdownGuestOs <Boolean>] [-WaitForVmPoweredOff <Boolean>] [-TimeoutSeconds
<UInt32>] -Connection <Hashtable> [<CommonParameters>]
DESCRIPTION
Stops a running VM.
PARAMETERS
-InputObject <PSObject[]>
Object representing the VM that is to be stopped. Use Get-VsphereObject to retrieve input object.
Required? true
Position? named
Default value
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-ShutdownGuestOs [<Boolean>]
Specifies whether the VM Guest OS will be shut down (soft stop) or if the VM will be powered off (hard stop).
The VM must have VMware Tools installed and running in order for the activity to shut down (soft stop) the VM.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-WaitForVmPoweredOff [<Boolean>]
Specifies whether the command will be waiting for the VM to reach the poweredOff state before completing.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-TimeoutSeconds [<UInt32>]
Specifies the number of seconds before the command times out, when configured to wait. If this parameter is
not specified and Wait For VM Powered Off is configured so that the command waits, the command will not time
out, it will wait indefinitely until the powered off.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Connection <Hashtable>
Specifies connection information to the vCenter server. For example:
@{ServerUrl='<vCenter Server URL>';User='<user>';Password='<password>';LicenseKey=<license
key>;SkipCertificateValidation=$false}
Required? true
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-VmId <String[]>
ID (managed object reference) of the VM that is to be stopped.
Required? true
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.Management.Automation.PSObject[]
OUTPUTS
System.String
ID (managed object reference) of the VM that was stopped.
RELATED LINKS
SYNOPSIS
Stops a running VM.
SYNTAX
Stop-VsphereVm -InputObject <PSObject[]> [-ShutdownGuestOs <Boolean>] [-WaitForVmPoweredOff <Boolean>]
[-TimeoutSeconds <UInt32>] -Connection <Hashtable> [<CommonParameters>]
Stop-VsphereVm -VmId <String[]> [-ShutdownGuestOs <Boolean>] [-WaitForVmPoweredOff <Boolean>] [-TimeoutSeconds
<UInt32>] -Connection <Hashtable> [<CommonParameters>]
DESCRIPTION
Stops a running VM.
PARAMETERS
-InputObject <PSObject[]>
Object representing the VM that is to be stopped. Use Get-VsphereObject to retrieve input object.
Required? true
Position? named
Default value
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-ShutdownGuestOs [<Boolean>]
Specifies whether the VM Guest OS will be shut down (soft stop) or if the VM will be powered off (hard stop).
The VM must have VMware Tools installed and running in order for the activity to shut down (soft stop) the VM.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-WaitForVmPoweredOff [<Boolean>]
Specifies whether the command will be waiting for the VM to reach the poweredOff state before completing.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-TimeoutSeconds [<UInt32>]
Specifies the number of seconds before the command times out, when configured to wait. If this parameter is
not specified and Wait For VM Powered Off is configured so that the command waits, the command will not time
out, it will wait indefinitely until the powered off.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Connection <Hashtable>
Specifies connection information to the vCenter server. For example:
@{ServerUrl='<vCenter Server URL>';User='<user>';Password='<password>';LicenseKey=<license
key>;SkipCertificateValidation=$false}
Required? true
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-VmId <String[]>
ID (managed object reference) of the VM that is to be stopped.
Required? true
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.Management.Automation.PSObject[]
OUTPUTS
System.String
ID (managed object reference) of the VM that was stopped.
RELATED LINKS