While in Barcelona, I got a sneak peek at how PowerShell will – in a future version – handle remoting. It’s pretty cool. Say you start with this:
Get-Service
Simple enough, right? This uses gets a list of all services on the local computer. In fact, this runs in-process, meaning it executes within the current instance of PowerShell. Now try this:
powershell {Get-Service}
This executes a new instance of PowerShell, passing it a scriptblock containing “Get-Service.” The new instance executes the cmdlet and passes the resulting objects – not text, mind you, but objects – back to the original instance of the shell. The end result – what you get on the screen, that is – is the same, but it’s important to understand that Get-Service didn’t run inside the original shell process. It ran out of process, with the results coming back into your shell.
A future version of PowerShell will allow this variant:
powershell {Get-Service} -computer Server2
See? This remotes the scriptblock to Server2, and returns the results to your original shell instance. In other words, you can execute anything you want to on the remote shell! Of course, PowerShell would have to be installed on the remote computer – which in itself presents some limitations. For example, “Longhorn” Server Core can’t run PowerShell (because Core doesn’t run the .NET Framework).
While we don’t have this capability yet, it’s neat to see that the PowerShell team is thinking about it, and that they’ve come up with such an elegant solution.
So this post was almost a year ago and where is this critical feature? It seems that a command shell that can’t remote to the systems on the local lan, and doesn’t come back through SSH when installed on the DMZ systems, isn’t that valuable to a Systems Admin that has multiple (in my case hundreds) of servers to admin. It’s a real shame. I mean, isn’t Microsoft aware of their image that people shouldn’t use their products until v3 or the first service pack, etc.??
Ship an amazing v1. Running powershell on a local box is for people who have time on their hands – not sysadmins who work 65 hours a week. I just read the entire blog.sapien.com site (277 entries I think).
It looks like the miners are losing out and the guys selling the pans are making the money.