net time

使計算機的時鐘與另一台計算機或域的時間同步

基本介紹

  • 中文名:net time
  • 語言:英語
  • 解釋1:純工作時間
  • 解釋2:低定額
詞典釋義,命令提示符(CMD)命令,語法,參數,套用舉例,實例,

詞典釋義

1、純工作時間;
2、低定額;
3、加工時間

命令提示符(CMD)命令

語法

net time
[\\ComputerName | /domain[:DomainName] | /rtsdomain[:DomainName]] [/set]
[\\ComputerName] /querysntp
[\\ComputerName] /setsntp[:NTP Server List]

參數

\\ComputerName指定要檢查或要與之同步的伺服器的名稱。
/domain[ :DomainName]指定要同步時鐘的域。
/rtsdomain[:domainname]指定要與之同步時鐘的“可信時間伺服器”所在的域。
/set使計算機的時鐘與指定的計算機或域的時間同步
/querysntp顯示當前為本地計算機或 ComputervNname 所指定的計算機配置的網路時間協定 (NTP) 伺服器的名稱。
/setsntp[:NTPServerList]指定本地計算機所使用的 NTP 時間伺服器的列表。該列表可以包含 IP位址或 DNS名稱,並用空格分開。如果使用多個時間伺服器,則必須使用引號引住該列表。
【備註】使用/set參數時可以直接在後面加上/y或/yes參數實現不詢問直接更改時間:
net time \\ComputerName /set /y

套用舉例

域控制器:msserver (Windows 2000 Advance Server SP4簡體中文版)
域 名:zsmstr.com
客 戶 機:Windows XPPro SP2 (English)
A、查看計算機的默認時間伺服器
語法:net time /querysntp
如下:
C:\Documents and Settings\jerry>net time /querysntp
The current SNTP value is: msserver (時間伺服器為:MSSERVER)
The command completed successfully.
B、改變計算機的默認時間伺服器
語法:net time /setsntp [:時間伺服器地址]
如下:
C:\Documents and Settings\jerry>net time /setsntp:time.windows.com
The command completed successfully.
時間伺服器改為:time.windows.com
C:\Documents and Settings\jerry>net time /querysntp
The current SNTP value is: time.windows.com
The command completed successfully.
更改後查詢的結果為:time.windows.com
C、顯示指定計算機的的當前時間
語法:net time \\computer
如下:
C:\Documents and Settings\jerry>net time \\msserver.zsmstr.com (或\\msserver)
Current time at \\msserver.zsmstr.com is 2005/10/10 下午 04:09
The command completed successfully.
D、指定要與之同步的域
語法:net time /domain[:域名] /set
net time /domain /set (使計算機的時間與當前域的當前時間同步)
如下:(注意在這裡把客戶機時間改快一個小時。)
C:\Documents and Settings\jerry>net time /domain:zsmstr /set
Current time at \\MSSERVER is 2005/10/10 下午 04:14
The current local clock is 2005/10/10 下午 05:14
Do you want to set the local computer's time to match the
time at \\MSSERVER? (Y/N) [Y]: y
The command completed successfully.

實例

比如你的區域網路里有一台機器,他開著guest用戶,密碼為空,他的ip是192.168.1.2命令如下:net use \\192.168.1.2\ipc$ "" /user:guest這樣就連上了他的ipc共享,上面的""裡面是密碼,這裡密碼為空然後net time \\192.168.1.2這樣就能看到他的時間了。

相關詞條

熱門詞條

聯絡我們