Is there a way to determine if remote machine is shutting down. May be WMI subsystem sends some events in such cases before it shuts down, so I can subscribe to it?
I’ve seen sombody here discussing catching EventLog shutting down event, but the author wasn’t sure at what point it actually shuts down.
Yes,
Win32_ComputerShutdownEventis what you need.