Last week I posted a PowerShell snippet on Twitter. My original post piped an array of integers as [CHAR] type using an OFS. Don’t worry about that. As many people reminded me, it is much easier to use the -Join … Continue reading →...
In a post yesterday, I looked at telling the difference between a scalar and arrays. The difference matters when working with PowerShell – a scalar has properties and methods, while an array has members that have properties and methods. You can directly...
Over on Hal Rotettenberg’s blog ( TechProsaic ), he recently posted an interesting article about how to tell if an object in PowerShell is an array or a scalar. His solution was to use the Get-Type method, and to look for the BaseType property of the...
Recently in a workshop, we wanted to create a little PowerShell script to return nine unique random numbers. Since all participants were experienced VBScript scripters, they quickly came up with a solution. This solution grew bigger and bigger and more complicated with every new detail ("the random...