Get the latest Windows restart timestamp?

I have a PC on a remote network connected, but it sometimes crashes or restarts remote users. After rebooting, some services and applications should be in a running state. Therefore, I would like to know the reboot as soon as possible. I think PS can be a good choice with some scenarios so that I can make a remote call to get the latest reboot timestamp information.

Is there a way to get the remote Windows XP restart timestamp using PowerShell 2.0 (its remote feature)?

+5
source share
4 answers

You can do this through WMI:

$wmi = Get-WmiObject -Class Win32_OperatingSystem -Computer "RemoteMachine"
$wmi.ConvertToDateTime($wmi.LastBootUpTime)
+17
source

:

$wmi = Get-WmiObject -Class Win32_OperatingSystem -Computer RemoteComputerName
$wmi.ConvertToDateTime($wmi.LastBootUpTime)
+3

" ". , , .

, "", , , - Windows: , .

+1

FYI, PowerShell Community Extensions 2.0 Beta, Get-Uptime, :

PS> Get-Uptime

Uptime                                LastBootUpTime
------                                --------------
00:44:01.4401754                      3/21/2010 12:07:17 AM
+1

All Articles