Hi!
I am trying to get a SQL Agent job to automatically restart Reporting Services (After an AO failover to recreate subscriptions).
I can do this either via Powershell:
restart-Service-Name'ReportServer$POC'
Or via DOS
cmd /c "net stop "ReportServer$POCDB" & sc start "ReportServer&POC""
But only if I open the Powershell/DOS window as administrator. Is there a way to get SQL Agent (or scheduled task) to run powershell or dos commands as administrator?
Thanks,
Zoe