Fix Unauthorized error when running powershell version script