PowerShell · Administration

Systemlaufzeit und letzter Start

Zeigt Bootzeit und aktuelle Systemlaufzeit kompakt an.

PowerShell
$os = Get-CimInstance Win32_OperatingSystem
[pscustomobject]@{
  Computer = $env:COMPUTERNAME
  LetzterStart = $os.LastBootUpTime
  Laufzeit = (Get-Date) - $os.LastBootUpTime
}
PowerShellUptimeBootWindows
WA