I often find myself connecting to a workstation or server with Remote Desktop to perform a task which requires a reboot. In these cases, I usually need to reconnect after the host comes back online to ensure everything went as planned or to continue my work. In these cases, I will typically launch "ping -t" in a command prompt to let me know when I can reconnect.
However, I will occasionally get distracted with something else while waiting for the host to come back online and forget to come back to it. It would be really nice to be alerted when the host is back online and allow me to reconnect (ideally with a single click).
Does anyone know of an easy way to accomplish this? I'm thinking there must be a free utility available, or perhaps it could be done with a PowerShell script.
Write "don't forget about $ServerName" on a sticky note and put it on your monitor.
Look at this function that start an RDP Session and at this piece of script for PowerShell .
Look at this piece of script code :
#This piece waits for the Server to come back online . do{$result = $ping.send("ServerName");write-host "." -NoNewLine -ForegroundColor "Red"} until ($result.status -eq "Success")
you could easily add the start RDP call after the loop that wait the host to come back on line . It could be not so difficult to achieve what you want with this two script.
Quick and dirty Powershell script that I use daily:
Doesn't time out, I'm afraid. But that could be easily added, along with a quick beep on successful response.
The bit I'm more happy with (taken from a currently unremembered source on the internet) is that this won't try and connect when the server comes responds to ping - instead, only when the standard RDP port is accessible.
OK, I don't know of anything that will call your cell phone, but if you open a command box, and do "ping -t" minus the quotes, it will keep pinging...not just the 4 times. It is hard to ignore that in the middle of your screen when you get back.
In the alternative, I strongly suggest you use choline daily as your mind is frying at a relatively young age.
I have a simple script on each of my servers that emails me when the server has rebooted. It's a batch file using blat on Windows, perl scripts on Mac and Linux. They are triggered by whatever means is appropriate to the OS. e.g. a Machine startup script on Window.
you could create a script that loops
this is a quick way to see what users are connected to a server, this particular syntax would looks specifically for the RDP listen session on that server, once that visible it should be possible to logon, i use the command slightly differently in a script that actually crawls around 60 servers, and identifies where on the network a user is logged in.
There are a couple of scripts available for this now, see: