Search code examples
powershellwindows-server-2003

Powershell 1.0 Set-Execution for LOCAL SYSTEM account


On a windows 2003 Server, I have a Powershell 1.0 script that I can execute happily as myself due to setting the Execution Policy to remoteSigned in my own user.

Upgrading to current/newer technology is out of the question I'm afraid.

The script needs to actually be called from a Windows Service that is running under the LOCALSYSTEM account.

I suspect that the Execution Policy for this account is still restricting access to run the scripts.

Is there a way of setting the Execution Policy for the SYSTEM account to enable the scripts to run?

Perhaps a system wide setting??


Solution

  • Based on this answer: https://stackoverflow.com/a/4647585/140377 you can just run Set-ExecutionPolicy RemoteSigned as an administrator and it will apply to all users.