PowerShell is a fantastic way to automate just about everything in a Windows and VMware environment, enabling your IT department to do with more with less, which is the must-have skill of today.
Unix aficionados switching to PowerShell may at first struggle with how to recreate their favorite functionality from Unix land, like grep and awk. PowerShell can do all the powerful string manipulations that awk/sed/perl can do, just in a different manner.
For example, a typical Linux scenario using awk and grep might be:
grep “somestring” foo.txt | awk ‘{print $2}’
The powershell equivalent is below:
select-string -pattern “somestring” foo.txt | foreach { $_.ToString().split(” “)[2] }
The very excellent PowerShell Community Extensions also provide some nice items you may desire from Unix/Linux toolbox.
