Some Powershell improvements