How to know Last Boot uptime of servers


Hi All,

Below is the sample script for that. Run this in your local desktop.

$computers = "Server1",”Server2”

$os = Get-CimInstance Win32_operatingSystem -ComputerName $computers

$os | Select Caption,OSArchitecture,InstallDate,LastBootUpTime,@{Name="Uptime";Expression={(Get-Date)-$_.LastBootUpTime}},PSComputername

Regards,

Chaitanya

Leave a comment

Design a site like this with WordPress.com
Get started