Test powershell return code functionality