Auto reconnect to a server you just rebooted with PowerShell 3.0

Sunday, January 8, 2012

Yesterday I saw a tweet that caught my eye: Sounds familiar? What do you usually do to reconnect to your server once it is back online? How do you monitor it’s availability? In this post, Justin shares a great function (115 lines) that restarts a server, waits for it to come back online and then starts a remote desktop connection to it. Now, what if I told you that in PowerShell 3.0 you can replace that function with only two lines of code? In PowerShell 3.0, the Restart-Computer cmdlet got improved (mainly to support Workflow scenarios) and it now supports...

Remote Desktop Services R2 Resource Kit

Tuesday, November 23, 2010

My new friends Christa Anderson and Kristin L. Griffin wrote the Microsoft Windows Server 2008 R2 Remote Desktop Services Resource Kit for which they asked me to contribute a “From the Field” article that examines the PowerShell TS Module I created.  This is the code example I wrote for them. The script gets all RD Session host servers in a domain, finds all active sessions that have been running for over an hour and disconnects them in order to save server resources:   1. Shows the usage of the -WhatIf parameter, what...