PowerShell Team

Automating the world one-liner at a time…

Converting to Array

When you run a PowerShell pipeline, that pipeline might return 0, 1 or many items.  If you are assigning the results of that pipeline to a variable, you will get $null, 1 item or an array of items respectively.  Sometimes, you won't care about the different types returned, but at other times, you'll actually prefer to force the ...
Comments are closed.0 0

Stopping Every Instance of PowerShell.exe (except the one I'm in)

Our Test Architect just dropped by my office and pitched me a PowerShell question with a nice, quick answer. He wanted to stop every process of a particular name, except for the instance that was running the script. You can do this in one nice pipeline: Get-Process Powershell  | Where-Object { $_.ID -ne $pid } | Stop-Process Get-...
Comments are closed.0 0

JAOO Talk

Last year I was delighted to be invited to give a talk at JAOO conference.  This is a great language conference.  The thing I was delighted to discover is that the while it had Microsoft content (AndersH gave one of the keynotes), the bulk of the people and content was non-Microsoft.  This allowed me to give a different kind of ...

#requires your scripts

Recently, I saw someone that had developed a script on the CTP3 drop and was then having trouble running it on v1 of PowerShell.  Eventually it turned out that he was using v2 features in his script.  Most of you know that we are trying to keep the next version of PowerShell compatible with v1 and I encourage you to report ...
Comments are closed.0 0

Diff between Windows PowerShell versions

PowerShell MVP Oisín Grehan has done a really good job in getting the diff between PowerShell releases. V1 and CTP3 http://www.nivot.org/2009/02/04/DifferencesBetweenPowerShell10RTMAndPowershell20CTP3Win7Beta.aspx CTP2 and CTP3 http://www.nivot.org/2008/12/23/PowerShell20CTP3HasArrived.aspx Thanks a lot Oisín. Osama Sajid [MSFT]  ...
Comments are closed.0 0
CTP3

Console Application (Non) Support in the ISE

There are some limitations on how the ISE interacts with console applications you need to be aware of, for apps like ftp and netsh.First of all, the ISE Runs console apps that don’t require user input just fine.For example, “ping www.microsoft.com” and “cmd /c dir /s”Piping also works fine in the ISE,For example, PS C:\Users\ibrar>...

Feedback usabilla icon