How to Restart or Shutdown a Remote Computer

As a Windows Administrator there will be some situations that you will need to restart or shutdown all office computers. In this article I’ll will show you a few examples how you can restart or shutdown remote computers with PowerShell.

Retrieve a specific Organizational Unit

If you need to restart all office computers in a specific organizational unit you will need first retrieve all parent and child organizational units. You can do this for example with the following PowerShell one-liner:

Graphical Output:

Note: the Out-GridView command after the pipe gives you the possibility to select the organizational unit in a graphical interface.

When you select the organizational unit and click on OK, all computers in the selecting organizational unit will be restarted.

Final PowerShell code

In this article I’ll have show you a example how you can restart or shutdown remote computers with PowerShell.

I really like to hear what you have to say about this article:

  • Was this article helpful for you or do you have any questions?
  • Do you have additions, suggestions or any other ideas?
  • Just let me know by leaving a comment below.

Thank you for spending some time at my site and in my blog. I hope you come to visit again soon!

About Lex van der Horst 201 Articles
Techwire

Be the first to comment

Leave a Reply