The easiest way to test programs running as LocalSystem is with psexec from https://microsoft.com/sysinternals
With that, you can run psexec -i -S cmd to open a command shell as the LocalSystem account, and then try executing your powershell.
The easiest way to test programs running as LocalSystem is with psexec from https://microsoft.com/sysinternals
With that, you can run psexec -i -S cmd to open a command shell as the LocalSystem account, and then try executing your powershell.