Checks whether the system was recently restarted.
retval = System.WasRestarted([Minutes])
- [Minutes]; optional, default is 60; numeric value; checks if the system was restarted in the last [Minutes] minutes
True if the system was restarted, false otherwise; boolean value.
$Minutes = 120;
//checks whether the system was restarted in the last two hours
MessageBox.ShowInfo("System was restarted in the last " + $Minutes);