Powershell 2 compatibility