Stop-SCService

Stops a VMM service and all virtual machines within the service.

Description

The Stop-SCService cmdlet stops a System Center Virtual Machine Manager (VMM) service and all virtual machines within the service. To start a service, use the Start-SCservice cmdlet.

For more information about Stop-SCService, type: "Get-Help Stop-SCService -online".

Parameters

Service

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a VMM service object.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? false
Position? named
Specifies a VMM server object.

Service

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a VMM service object.

DiscardSavedState

Required? true
Accept Pipeline Input? false
Position? named
Deletes the saved state associated with a virtual machine or service.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? false
Position? named
Specifies a VMM server object.

Service

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a VMM service object.

SaveState

Required? true
Accept Pipeline Input? false
Position? named
Saves the state of a virtual machine or service.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? false
Position? named
Specifies a VMM server object.

Service

Required? true
Accept Pipeline Input? true (ByValue)
Position? 0
Specifies a VMM service object.

Shutdown

Required? true
Accept Pipeline Input? false
Position? named
Indicates that a virtual machine, service, or a source server should be shut down. In the case of a virtual machine or service, the associated cmdlet attempts to use the operating system to shut the virtual machine down gracefully. In the case of a successful physical-to-virtual machine (P2V) conversion, the cmdlet shuts down the source server.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? false
Position? named
Specifies a VMM server object.

Examples

1: Stop a specific service.
PS C:\> $Service = Get-SCService -Name "Service01"
PS C:\> Stop-SCService -Service $Service
The first command gets the service object named Service01 and stores the object in the $Service variable.

The second command stops the service in $Service, which stops all of the virtual machines in the service.

See Also