Using PowerShell to view system uptime

Hi

Today I just found a very handy command that will display the computer/ last reboot in PowerShell;

Just  copy and paste into your console, as you can

Get-WmiObject -Class Win32_OperatingSystem -ComputerName localhost | Select-Object -Property @{n="Last Boot Time";e={[Management.ManagementDateTimeConverter]::ToDateTime($_.LastBootUpTime)}}

If you get tired you always can use:

systeminfo | find "Time"
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.