I have a monitoring routine that runs 24/7. The scheduler starts it
during system startup. It sends a summary of events twice/day. If
the system gets bounced for any reason (like the corporate bots
sending OS patches) I loose whatever was waiting to be sent. Is there
a way PowerShell can detect or get notified when someone does a
shutdown so I can save the data before the system goes down.