Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Code Snippet from aperturescience.su
- $services = Get-Service $query
- foreach ($svc in $services)
- {
- if ($svc.status -ne "running")
- {
- try {
- $svc.start()
- } catch {
- }
- send-email "One or more services were not running. $($svc.displayname)" $false
- }
- }
- # Code Snippet from aperturescience.su
Advertisement
Add Comment
Please, Sign In to add comment