Created
March 26, 2014 16:04
-
-
Save belotn/9786817 to your computer and use it in GitHub Desktop.
List failure option of a service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get-xaserver |% { | |
gwmi Win32_Service -ComputerNAme $_.ServerName -Filter 'Name="cpsvc"' } |select __SERVER,@{N="failure";E={ | |
(sc.exe \\$($_.__SERVER) qfailure $($_.Name) | select-string 'FAILURE') -ne $null | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment