PowerShell Logo Small

Stop-VM



This is the built-in help made by Microsoft for the command 'Stop-VM', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Shuts down, turns off, or saves a virtual machine.

SYNTAX


Stop-VM [-Name] <String[]> [-AsJob] [-ComputerName <String[]>] [-Force] [-Passthru] [-Save] [-TurnOff] [-Confirm] [-WhatIf] [<CommonParameters>]
Stop-VM [-VM] <VirtualMachine[]> [-AsJob] [-Force] [-Passthru] [-Save] [-TurnOff] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Stop-VM cmdlet shuts down, turns off, or saves a virtual machine.



<

RELATED LINKS


Online Version: http://go.microsoft.com/fwlink/?LinkID=306964

REMARKS

<

Examples


Example 1

PS C:\>Stop-VM –Name TestVM



Shuts down virtual machine TestVM through the guest operating system.




Example 2

PS C:\>Stop-VM –Name VM1 -Force



Shuts down virtual machine TestVM through the guest operating system, regardless of any unsaved application data. Hyper-V gives the guest five minutes to save data, then
forces a shutdown. This shutdown can result in loss of unsaved data.




Example 3

PS C:\>Stop-VM –Name TestVM –TurnOff



Turns off virtual machine TestVM. This operation is equivalent to disconnecting the power from the virtual machine, and can result in loss of unsaved data.