How to shutdown/restart Windows server VM

Many times we have used Linux or Windows based VM’s (Virtual Machines) and we tend to install software to try out something. Particularly on Windows VM’s you may have to restart the VM for the changes to take effect. But most of often when the VMs are provisioned, the ‘Shutdown’ or ‘Restart’ menu items are not enabled or visible.  How else could one restart the VM without having to contact support and wait for some one to help?

We can use windows command line to initiate a shutdown or restart.

Requisites

1. Windows VM

2. Access to cmd

 

Steps

Open cmd

Type ‘shutdown /i’
Image1
This would bring the popup window as shown below
Image2
Select the Add Button and enter the default ip for the current VM
Image3
Select Ok.
Add any other IP address you may want to restart or shutdown
Verify the Restart or Shutdown options
Image4
Verify the Shutdown Event Tracker reasons
Image5
Add a comment as to what changed or why the VM has to be shutdown or restarted
Image6
Select Ok
The VMs would be shut down or restarted as specified.
Remember, this command would only work for a user with admin priveleges or part of the admin group on the VM

Leave a Reply

Your email address will not be published. Required fields are marked *