Ottenere l'uptime da una macchina windows tramite PowerShell
Da ElettraWiki.
Per ottenere l'uptime di una macchina windows è sufficiente digitare in powershell il seguente comando: (get-date) - (gcim Win32_OperatingSystem).LastBootUpTime L'output generato sarà simile al seguente: PS C:\Windows\system32> (get-date) - (gcim Win32_OperatingSystem).LastBootUpTime
Days : 0
Hours : 1
Minutes : 33
Seconds : 2
Milliseconds : 807
Ticks : 55828071635
TotalDays : 0,0646158236516204
TotalHours : 1,55077976763889
TotalMinutes : 93,0467860583333
TotalSeconds : 5582,8071635
TotalMilliseconds : 5582807,1635