Fix issue with Powershell version 2.0