Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Monitor Changes in Computer Power StatusContent of Monitor Changes in Computer Power Status.vbsMD5 Hash: 8AD92D8D2DD79BA33E7FFE5C9D6E08DC |
||
' Description: Issues an alert if a computer changes power state (for example, enters or leaves suspend mode).
Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colMonitoredEvents = objWMIService.ExecNotificationQuery _ ("Select * from Win32_PowerManagementEvent") Do Set strLatestEvent = colMonitoredEvents.NextEvent Wscript.Echo strLatestEvent.EventType Loop | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |