You heard it! PowerShell V3 CTP 1 is out in the wild and ready for downloaded right here!
Bear in mind that this is only for Windows 7 and Windows 2008R2. It does require a reboot to complete the installation but on a good note, you do not have to uninstall anything to get this working. Also required is .NET 4.0 as well.
A couple of great things that I have found now that I can play with this on a Windows 7 machine is that Export-CSV has a –Append parameter!
This means we can finally add to an existing csv file as long as the headers are the same.
Get-Process | Export-Csv report.csv -NoTypeInformation Get-Process | Export-Csv report.csv -NoTypeInformation -append
Great stuff! Now what happens if we try to use the –append with mis-matched properties?
Get-Process | Export-Csv report.csv -NoTypeInformation Get-Service | Export-Csv report.csv -NoTypeInformation -Append
You can use the –Force parameter, but understand that you are pretty much ruining the csv for future use.
Get-Process | Export-Csv report.csv -NoTypeInformation Get-Service | Export-Csv report.csv -NoTypeInformation -append -force Import-Csv report.csv
Yea, not so pretty, is it?
So we have a very useful addition to an already great cmdlet, Export-Csv!
So what are you waiting for? Download PowerShell V3 and get to exploring because there is soooo much more to find!
Checkout this post to see my simple demo on invoke-webrequest. http://www.cachelog.net/powershell-v3-invoke-webrequest/