Want to find out when the last your server/laptop boot up? We have a simple solution for it ;) use the below class ...
Get-CimInstance -ClassName win32_operatingsystem
OR
Get-CimInstance -ClassName win32_operatingsystem | select lastbootuptime
With Regards.
Aman Dhally
If you like, you can follow me on Twitter and Facebook. You can also check my “You Tube” channel for PowerShell video tutorials. You can download all of my scripts from “Microsoft TechNet Gallery”.
New-TimeSpan -Seconds (Get-WmiObject Win32_PerfFormattedData_PerfOS_System).SystemUptime | Format-Table Days,Hours,Minutes
ReplyDelete