Client-free PowerShell Remoting – a Live Mesh Command Line
Friday, 8 August 2008
Once problem that often arises when trying to manage machines is when the management layer itself is the thing you need to diagnose. For example, trying to diagnose Remote Desktop connectivity issues when port 3389 is blocked, or using PowerShell Remoting when WSMAN is misconfigured.
Alternatively, you might not have the client you need to manage the machine — such as an SSH client, or a version of PowerShell V2 installed.
One way to get around both of these problems is another communication channel. It may be of lower fidelity, but can help you get your job done.
One perfect example of an alternative communication channel is any of the many synchronization tools out there: Live Mesh, Syncplicity, FolderShare, etc. In addition to managing connectivity, they let you broadcast messages (by way of files) between connected computers. Let’s use that as our communication protocol:
The core of this experience comes from a PowerShell Mesh Monitor. This script monitors a computer-specific directory for new scripts that appear. When it sees a new script, it processes it, captures the output, and then stores the output in a similarly named file. You can then retrieve the file, review its contents, and continue to manage the system this way:
With file synchronization as a back-end, you can now write a thin remoting client in nearly any language, and nearly any OS — as long as it can read and write files, and is supported by your file synchronization client. Taking this same approach, you could also use email, FTP, web pages, or nearly anything else as a communication mechanism.
On top of that, you might want to build a primitive interactive remoting experience. Once Live Mesh completes their Windows Mobile client, I’ll be doing that ASAP. Here’s a PowerShell script that demonstrates the approach:

Subscribe to this blog.