PowerShell
$os = Get-CimInstance Win32_OperatingSystem
[pscustomobject]@{
Computer = $env:COMPUTERNAME
LetzterStart = $os.LastBootUpTime
Laufzeit = (Get-Date) - $os.LastBootUpTime
}Hinweis: Nur lesend.
PowerShellUptimeBootWindows
Zeigt Bootzeit und aktuelle Systemlaufzeit kompakt an.
$os = Get-CimInstance Win32_OperatingSystem
[pscustomobject]@{
Computer = $env:COMPUTERNAME
LetzterStart = $os.LastBootUpTime
Laufzeit = (Get-Date) - $os.LastBootUpTime
}