承接上篇工具簡介,本文詳細實測 dnscmd 三大核心指令:/Info 查詢伺服器屬性、/Config 重設伺服器/區域屬性、/Statistics 顯示/清除統計資料,含完整參數表、實際輸出範例與中文註解。
dnscmd 伺服器名稱 指令 [參數]
伺服器名稱可為:本機 (.)、IP 位址、FQDN、NetBIOS 名稱。
dnscmd ServerName /Info [Property]
C:\>dnscmd 172.16.12.1 /info DNS Server 172.16.12.1 Information: Query result: 查詢結果 Server info: 服務器信息 ptr = 00074718 端口 server name = myserver.microsoft.com 服務器名稱 version = C2000005 版本 DS container = c DS容器 Configuration: 配置信息 dwLogLevel = 00000000 dwDebugLevel = 00000000 dwRpcProtocol = FFFFFFFF ... Configuration Flags: 配置標誌 fBootMethod = 3 fAdminConfigured = 1 fAllowUpdate = 1 fDsAvailable = 1 fAutoReverseZones = 1 fRoundRobin = 1 fLocalNetPriority = 1 fBindSecondaries = 1 ... Aging Configuration: ScavengingInterval = 0 DefaultRefreshInterval = 168 DefaultNoRefreshInterval = 168 ServerAddresses: Addr[0] = 172.16.12.1 Forwarders: Addr[0] = 172.16.4.3, forward timeout = 5 Command completed successfully.
完整輸出提供感性認識,排錯時可快速比對關鍵旗標 (如動態更新、循環輪詢、轉送器等)。
dnscmd ServerName /Config [ZoneName | ..AllZones] Property Value
..AllZones → 重設區域屬性/EnableRegistryBoot, /RpcProtocol, /LogLevel, /EventlogLevel/SecureSecondaries, /AllowUpdate, /Aging, /RefreshInterval Value, /NoRefreshInterval Value0x1)dnscmd ServerName /Statistics [Filter | /Clear]
0x1=Time, 0x2=Query, 0x4=Query2, 0x8=Recurse, 0x10=Master, 0x20=Secondary, 0x40=WINS, 0x100=Update, 0x400=DS, 0x10000=Memory, 0x40000=Dbase, 0x80000=Records 等掌握這三大指令,即可涵蓋 DNS 伺服器狀態監控、配置調整與效能統計分析的核心需求。
Active Directory 基礎安全架構與疑難排解實務
Longhorn 4051 深度體驗(三):WinFS 資料庫檔案系統、64 位元支援、相容性測試與 WinFX 新一代 API 架構
Windows 2000 SP4 安裝後八大常見問題與解決方案
Windows 2000 虛擬主機 NTFS 權限鎖死實戰:從磁碟分區到 System32 核心執行檔逐層防護
Windows Server 2003 安裝檔案與列印伺服器:精靈與手動雙重模式完整操作指南
Windows Server 2008 密碼重設磁碟:建立與使用完整圖文教學