Skip to content

Instantly share code, notes, and snippets.

@alexinnes
Created May 20, 2015 11:20
Show Gist options
  • Save alexinnes/18202006f8473b1ff6b5 to your computer and use it in GitHub Desktop.
Save alexinnes/18202006f8473b1ff6b5 to your computer and use it in GitHub Desktop.
Quick script to check when the computer has been rebooted.
#
# RebootTime.ps1
#
Set-ExecutionPolicy -ExecutionPolicy Bypass
Get-WmiObject win32_operatingsystem | select csname, @{LABEL='LastBootUpTime';EXPRESSION={$_.ConverttoDateTime($_.lastbootuptime)}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment