Ben*_*oit 122
开始 -> 运行 -> cmd.exe
系统信息 | 找到“系统启动时间”
或者对于更新的操作系统版本(见评论):
系统信息 | 找到“系统启动时间”
Mou*_*tte 16
打开powershell命令并运行它以查看您的所有历史记录......并且不需要用户界面:-)
get-eventlog System | where-object {$_.EventID -eq "6005"} | sort -desc TimeGenerated
Run Code Online (Sandbox Code Playgroud)
小智 11
我使用Microsoft 的 Sysinternals 包中的PsInfo实用程序,它将为您提供如下输出:
PsInfo v1.77 - Local and remote system information viewer
Copyright (C) 2001-2009 Mark Russinovich
Sysinternals - www.sysinternals.com
System information for \\JEFF-DELL:
Uptime: 0 days 0 hours 33 minutes 27 seconds
Kernel version: Microsoft Windows XP, Multiprocessor Free
Product type: Professional
Product version: 5.1
Service pack: 3
Kernel build number: 2600
Registered organization:
Registered owner:
IE version: 8.0000
System root: C:\WINDOWS
Processors: 2
Processor speed: 2.3 GHz
Processor type: Intel(R) Core(TM)2 Duo CPU E6550 @
Physical memory: 3316 MB
Video driver: Live Mesh Remote Desktop Mirror Driver
Run Code Online (Sandbox Code Playgroud)
Sei*_*hun 10
如果您使用的是 Server 2008,您可以在“任务管理器”-“性能”选项卡上查看以小时为单位的系统正常运行时间。据我所知,“net statistics ...”方式是 Windows 2003 上唯一正确的方式。
小智 8
使用 wmi 客户端。
C:\>wmic OS GET CSName,LastBootUpTime
CSName LastBootUpTime
SERVER 20101124084714.500000-360
Run Code Online (Sandbox Code Playgroud)
注意:-360 = GMT-6
上次系统启动时间
我个人最喜欢使用 WMI 和 Win32_OperatingSystem 属性/方法。这是一个简单的复制/粘贴单行:
((Get-WmiObject Win32_OperatingSystem).ConvertToDateTime((Get-WmiObject Win32_OperatingSystem).LastBootUpTime))
Run Code Online (Sandbox Code Playgroud)
同样的事情,但更容易手动输入:
$obj = Get-WmiObject Win32_OperatingSystem
$obj.ConvertToDateTime($obj.LastBootUpTime)
Run Code Online (Sandbox Code Playgroud)
这两个选项都提供如下输出:
Monday, June 30, 2014 11:59:50 AM
Run Code Online (Sandbox Code Playgroud)
系统正常运行时间
如果您想了解系统在线的时间,您可以这样做(这也是另一种代码风格):
$Obj = Get-WmiObject -Class Win32_OperatingSystem
$Obj.ConvertToDateTime($Obj.LocalDateTime) - $Obj.ConvertToDateTime($Obj.LastBootUpTime)
Run Code Online (Sandbox Code Playgroud)
这给出了如下输出:
Days : 7
Hours : 1
Minutes : 59
Seconds : 42
Milliseconds : 745
Ticks : 6119827457690
TotalDays : 7.08313363158565
TotalHours : 169.995207158056
TotalMinutes : 10199.7124294833
TotalSeconds : 611982.745769
TotalMilliseconds : 611982745.769
Run Code Online (Sandbox Code Playgroud)
小智 5
使用 Powershell
Get-CimInstance -ClassName win32_operatingsystem | select csname, lastbootuptime
CSName LastBootUpTime
Server 7/5/2014 6:00:00 AM
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
483244 次 |
| 最近记录: |