Monthly Archives: April 2008

Measure-Object

One cmdlet that seems to be consistently overlooked is Measure-Object.   I recently saw a question – how can I count the number of services on my machine and saw this as the response   Get-service | foreach {$t=0} {$t … Continue reading

Posted in Uncategorized | 2 Comments

Renaming Files

Question came up on a forum – how do I rename files of the form A_B_C_1-2-3.txt  to  A_B_C_123.txt.  In other words how do I remove the hyphens from the name.   Get-ChildItem *.txt | ForEach-Object {    $name = $_.BaseName.Replace("-","")    Rename-Item … Continue reading

Posted in Uncategorized | 3 Comments

MMS

Keep an eye on the announcements from the Microsoft Management Summit next week – http://blogs.msdn.com/powershell/archive/2008/04/26/heading-to-microsoft-management-summit-mms-where-we-ll-show-powershell-ctp2.aspx    

Posted in Uncategorized | Leave a comment

String expansion

One of the really powerful features of Powershell is the ability to expand strings   PS C:Scripts> $s = "Joe"PS C:Scripts> $st = "Hello $s"PS C:Scripts> $stHello Joe   However this breaks down if you have an array   PS … Continue reading

Posted in Uncategorized | Leave a comment

Powershell V2 CTP

The next CTP for PowerShell V2 is on the way – see   http://blogs.msdn.com/powershell/archive/2008/04/24/how-could-you-top-ctp1.aspx   http://blogs.msdn.com/powershell/archive/2008/04/24/changes-in-upcoming-ctp.aspx     Note the changes around remoting and that is this CTP it is only available on Windows 2008 and Vista

Posted in Uncategorized | Leave a comment

Back On Line

Another laptop failure (this time the hard disk) left me without a machine for the last few days.   Lets skip Web 2.0 and 3.0 – we need Web 11.0 – upload by telepathy    

Posted in Uncategorized | 2 Comments

PowerGUI 1.5

Dmitry has blogged that PowerGUI 1.5 is on the way http://dmitrysotnikov.wordpress.com/2008/04/08/powergui-survey-safe-mode-shortcut/ And would like feedback as to whether PowerGUI safe mode is still required   Share this post :

Posted in Powershell | Leave a comment