I am trying to come up with a script to restart a server and then send an email when the server is up.
I am stuck right now on what to do as I've tried a few things and no luck.
I started with just this basic command, and if I run it in a pshell console then the server will restart, but then I can't get it to run as a task and I've got no idea how to send an email after the reboot?'
Restart-Computer -ComputerName <string[ ]>,