Add to Technorati Favorites
Welcome to ThePowerShellGuy.com Sign in | Join | Help

Get-Shell | where {$_.pipeline -contains 'Objects'}

I colleague of mine asked where my Office Communicator comment came from :

image

The explanation to that Question follows :

Say you have to pick a Shell to do your windows administration with ... ,

First you make a list in CSV (or excel but for this example I create the CSV file on the fly from PowerShell, and for political reasons minimized the list of Shell's to pick from, but you can add as many shells to the list as you wish the line keeps working fine ;-) )

and then how do you pick the right Shell from it ??

you make a function to import the CSV file that you call get-Shell and then execute the command in the Title of this post.

image

Yes so easy can it be and that explains why you have to get the Shell where the Pipeline contains objects ( ... and commands (can) read almost as English)

So now you all know why I picked this line.. and what you have to do if you need to pick a Shell

Enjoy,

Greetings /\/\o\/\/

PS. Credits owned : I original stole this from a PowerShell marketing poster that contained a misspelled version of this command , and corrected it to be  syntactical correct in PowerShell

Published Thursday, September 25, 2008 4:05 PM by MoW
Filed under:

Comments

No Comments
Anonymous comments are disabled