Hi Gurus,
I have a PowerShell script used to stop/start services on a remote 2016 server running from another 2016 server.
I enabled PS remoting, enabled File and Printer sharing in Firewall, I have a domain user which has Domain Admin permission.
When I run the script from Task Scheduler using that account, I get the below error:
Cannot open Service Control Manager on computer 'xxx.xxx.xxx.xxx'. This operation might require other privileges.[0]
When I use Administrators group in the Task Scheduler, it works fine when triggered manually (and of course it doesnt trigger automatically because I cannot change the checkbox for "Run whether User is logged in or not").
When I run the script from PowerShell As Administrator, it works fine too.
When I run the script manually from PowerShell using the domain account (Run As Different user), it works fine as well.
What could be wrong with Task Scheduler?







