Use-SCStopVM
Changes a virtual machine from its current state to the Stopped state.
Syntax
Default (Default)
Use-SCStopVM
[-VM] <VM>
[-RunAsynchronously]
[-JobVariable <String>]
[-PROTipID <Guid>]
[<CommonParameters>]
Description
The Use-SCStopVM cmdlet shuts down a virtual machine in System Center 2019 Virtual Machine Manager. This cmdlet changes the virtual machine to the Stopped state regardless of the current state.
Examples
Example 1: Move a virtual machine to the Stopped state
PS C:\> $VM01 = Get-SCVirtualmachine -Name "ContosoVM01"
PS C:\> Use-SCStopVM -VM $VM01
The first command gets the virtual machine named ContosoVM01, and then stores it in the $VM01 variable. The virtual machine could be in any state.
The second command moves the virtual machine in $VM01 to the Stopped state.
Parameters
-JobVariable
Specifies a variable in which job progress is tracked and stored.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-PROTipID
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.
Parameter properties
Type: | Guid |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-VM
Specifies a virtual machine object.
Parameter properties
Type: | VM |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.