One of my Exchange 2019 Core Servers in my lab locked up and was not responding and when it did respond was giving errors when running commands but the same commands worked on another server.

As these are virtual machines, you can reboot it from the HyperVisor but that defeats the purpose of using PowerShell to perform the same task.

Previously, the command “Shutdown -i” would work but it does not seem to do anything on Windows Server Core.

There is a command you can run from PowerShell, I used PowerShell ISE from my Domain Controller and the machine rebooted in a few seconds. Here is the command I used which you may be familiar with:

shutdown /r /m \\Server1.domain.com /t 0

Here is what it looks like when you use PowerShell ISE:

Quickly reboot a windows server remotely with powershell.

The /t 0 options will reboot it instantly instead of waiting like you would have with “Shutdown -i”

This was just a quick blog to give you a tip and maybe help out those that are new to managing servers.

Hope you find it helpful.

    wpChatIcon

    Discover more from Everything-PowerShell

    Subscribe now to keep reading and get access to the full archive.

    Continue reading