An Up and Down PowerShell Challenge


The Chairman has a new challenge to prepare his scripting warriors for the upcoming PowerShell Summit. The challenge is aimed at intermediate to advanced scripters. You are encouraged to fulfill as many of the requirements as you can.

The Chairman would like a tool that he can use to query a Windows-based server to discover the following information:

  • When was a server last shutdown?
  • When did the server start up again?
  • How long was it down?
  • What is the current uptime?

Naturally, the output should include the computer name. To show your scripting superiority, the output should also include the account that initiated the shutdown or reboot. The function should accept alternate credentials and be able to accept pipeline input for a list of server names.

As always, please submit links to your work in the comments.

3 Replies to “An Up and Down PowerShell Challenge”

Comments are closed.