System Admin Monitoring Scripts


#Check if service has been installed (20 servers):
for /l %i in (1,1,20) do @echo myserver%i && sc \\myserver%i GetDisplayName myService

#Check service status (20 servers)
for /l %i in (1,1,20) do @echo myserver%i && sc \\myserver%i query myService | findstr /i state


#Check if any Automatic Start service is stopped (PowerShell)
Get-WmiObject -Class Win32_Service -Filter {State != 'Running' and StartMode = 'Auto'} |
Select-Object -Property DisplayName, Name, StartMode, State



Comments

Popular Posts