Handy if your virtual machine domain controller is not started and you can phycially login to the Hyper-v server.
- Get-VM
- Lists your virtual machines
- Start-VM “Name”
- Starts the vm
- Stop-VM “Name”
- Stops the vm
- Stop-VM “Name” -turnoff
- Forces a shutdown (same as holding the power button down)
- Stop-VM “Name” -save -force
References:
https://www.altaro.com/hyper-v/10-awesome-hyper-v-cmdlets/
https://devblogs.microsoft.com/scripting/get-a-list-of-virtual-machines-by-using-powershell/
http://stephanco.blogspot.com/2013/05/new-vm-powershell-commandlet-to-easily.html