I wouldn’t recommend setting the execution policy like that, instead use the “ExecutionPolicy” command line parameter to have it run this time only, regardless of the current ExecutionPolicy setting.
No go. I still get the error code 1. Could it be because it is running as system? When I run this command from cmd.exe, it works fine, but it doesn’t translate properly when I run it in Bigfix.
I don’t really know what this is trying to do, so I don’t know if that is why it isn’t working.
Trying running the command using PSExec as the system account and see if it works there, which should be a much closer match to the way BigFix will run it through the client.
I would also try running a powershell command with the following preceding it in the actionscript:
action uses wow64 redirection {not x64 of operating system}
When running powershell through bigfix it will use 32bit powershell which can cause issues if the powershell must be run using 64bit powershell on a 64bit OS to succeed. Using this in the actionscript causes BigFix to invoke the 64bit powershell instead of the 32bit powershell.