Quantcast
Channel: THWACK: Popular Discussions - Script Lab
Viewing all articles
Browse latest Browse all 9937

IIS reset with powershell

$
0
0

Hi there,

 

i'd like solarwinds to automatically reset iis on a server if that server CPU goes over 50%.

 

The server is managed using WMI, and has powershell 2.0 installed, i have this script working locally (i.e. running from the powershell cmd on the solarwinds server) :

 

$cred = Get-Credential
Invoke-Command server1 -ScriptBlock { Restart-Service w3svc -Force } `
  -cred $cred

 

could someone help me put this together into solarwinds, and in turn alerts manager?

 

Thanks!


Viewing all articles
Browse latest Browse all 9937

Trending Articles



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