Saber el último reinicio de nuestro equipo desde #powershell

por | 27 diciembre, 2015

Con este simple progamita en powershell vemos el último reinicio que le hemos hecho a nuestro equipo.

Captura

clear
$os = Get-WmiObject -Class Win32_OperatingSystem
$boottime = [System.Management.ManagementDateTimeConverter]::ToDateTime($os.LastBootupTime)
$timedifference = New-TimeSpan -Start $boottime
$days = $timedifference.TotalDays
‘El sistema esta funcionando desde hace {0:0.0} dias.’ -f $days

Deja una respuesta