Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

How to automate a restart of Reporting Services?

$
0
0

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


Viewing all articles
Browse latest Browse all 4729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>