We all have our own ways of finding a servers / computers uptime.
But I thought I’d share my favorite way:
function Get-SrvUptime
{
$operatingSystem = Get-WmiObject Win32_OperatingSystem
[Management.ManagementDateTimeConverter]::ToDateTime($operatingSystem.LastBootUpTime)
}
powershellservertipstipstrixwindows
Get system uptime
December 8, 2017
Powershell, Server, Tips and Trix, Tools, Windows
No Comments
vincent
We all have our own ways of finding a servers / computers uptime.
But I thought I’d share my favorite way:
function Get-SrvUptime
{
$operatingSystem = Get-WmiObject Win32_OperatingSystem
[Management.ManagementDateTimeConverter]::ToDateTime($operatingSystem.LastBootUpTime)
}
powershellservertipstipstrixwindows