Skip to content

Instantly share code, notes, and snippets.

@PSingletary
Created December 15, 2020 02:04
Show Gist options
  • Save PSingletary/66dd1bf6c4d42499dc18b6f51ae5ba81 to your computer and use it in GitHub Desktop.
Save PSingletary/66dd1bf6c4d42499dc18b6f51ae5ba81 to your computer and use it in GitHub Desktop.
Last boottime examples
#Requires -Version 5.1
#Requires -PSEdition Desktop
Get-CimInstance -ClassName win32_operatingsystem | select csname, lastbootuptime
get-eventlog system | where-object {$_.eventid -eq 6006} | select -first 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment