There are multiple ways to report Windows last boot time...
Get-CimInstance Win32_OperatingSystem | Select-Object LastBootUpTime
Get-WinEvent -ProviderName EventLog | Where-Object {$_.Id -eq 6005 -or $_.Id -eq 6006} | Select-Object -First 1 TimeCreated
Get-WinEvent -ComputerName localhost -FilterHashtable @{logname = 'System'; id = 1074} -MaxEvents 1 | format-list
wmic os get lastbootuptime
systeminfo | find "System Boot Time:"
net stats srv
Note that in my testing of this method, the date was consistent with other methods above but time was notInstall-Script -Name Get-ServerUptimeReport
For a single server...
./Get-ServerUptimeReport.ps1 -ComputerName myServer
For multiple servers...
$servers = 'myServer1','myServer2'
foreach ($server in $servers) {
Get-ServerUptimeReport.ps1 -ComputerName $server | Select-Object -Property *,@{n='ServerName';e={$server}}
}
Performance tab, CPU page