在Windows系统中,可以使用多种命令来查看服务器的信息。以下是一些常用的命令及其用途:
systeminfo
这个命令提供了系统的详细信息,包括操作系统版本、安装日期、系统制造商、系统型号等。
使用方法:
systeminfo
输出示例:
Host Name: SERVER01
OS Name: Microsoft Windows Server 2019 Standard
OS Version: 10.0.17763 N/A Build 17763
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Server
OS Build Type: Multiprocessor Free
Registered Owner: Windows User
Registered Organization:
Product ID: 00377-90000-00000-AA888
Original Install Date: 1/1/2020, 12:00:00 AM
System Boot Time: 3/15/2023, 9:00:00 AM
System Manufacturer: Dell Inc.
System Model: PowerEdge R740XD
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 142 Stepping 10 GenuineIntel ~2800 Mhz
BIOS Version: Dell Inc. 2.10.0 03/24/2020
Windows Directory: C:\Windows
System Directory: C:\Windows\system32
Boot Device: \Device\HarddiskVolume1
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Time Zone: (UTC-05:00) Eastern Time (US & Canada)
Total Physical Memory: 65,536 MB
Available Physical Memory: 30,000 MB
Virtual Memory: Max Size: 72,848 MB
Virtual Memory: Available: 35,000 MB
Virtual Memory: In Use: 37,848 MB
Page File Location(s): C:\pagefile.sys
Domain: WORKGROUP
Logon Server: \\SERVER01
Hotfix(s): 10 Hotfix(s) Installed.
[01]: KB4537814
[02]: KB4541335
[03]: KB4550964
[04]: KB4556799
[05]: KB4565349
[06]: KB4568035
[07]: KB4571736
[08]: KB4577586
[09]: KB4580325
[10]: KB4586853
Network Card(s): 2 NIC(s) Installed.
[01]: Intel(R) Ethernet Connection (2) I219-V
Connection-specific DNS Suffix . :
Description . . . . . . . . . . : Intel(R) Ethernet Connection (2) I219-V
Physical Address. . . . . . . . : 00-1A-2B-3C-4D-5E
DHCP Enabled. . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . : fe80::31a2:b3c4:d5e6:f789%12(Preferred)
IPv4 Address. . . . . . . . . . : 192.168.1.100(Preferred)
Subnet Mask . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . : 3/15/2023 8:00:00 AM
Lease Expires . . . . . . . . . : 3/16/2023 8:00:00 AM
[02]: Intel(R) Wireless-AC 9560
Connection-specific DNS Suffix . :
Description . . . . . . . . . . : Intel(R) Wireless-AC 9560
Physical Address. . . . . . . . : 00-2B-3C-4D-5E-6F
DHCP Enabled. . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . : fe80::2b3c:4d5e:6f7a:8b9c%13(Preferred)
IPv4 Address. . . . . . . . . . : 192.168.1.101(Preferred)
Subnet Mask . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . : 3/15/2023 8:00:00 AM
Lease Expires . . . . . . . . . : 3/16/2023 8:00:00 AM
ipconfig
这个命令用于显示当前TCP/IP网络配置值,并刷新DHCP配置和DNS缓存。
使用方法:
ipconfig /all
输出示例:
Windows IP Configuration
Host Name . . . . . . . . . . . . : SERVER01
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) Ethernet Connection (2) I219-V
Physical Address. . . . . . . . . : 00-1A-2B-3C-4D-5E
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::31a2:b3c4:d5e6:f789%12(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.100(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : 3/15/2023 8:00:00 AM
Lease Expires . . . . . . . . . . : 3/16/2023 8:00:00 AM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.2
DNS Servers . . . . . . . . . . . : 8.8.8.8
8.8.4.4
NetBIOS over Tcpip. . . . . . . . : Enabled
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) Wireless-AC 9560
Physical Address. . . . . . . . . : 00-2B-3C-4D-5E-6F
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::2b3c:4d5e:6f7a:8b9c%13(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.101(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : 3/15/2023 8:00:00 AM
Lease Expires . . . . . . . . . . : 3/16/2023 8:00:00 AM
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.2
DNS Servers . . . . . . . . . . . : 8.8.8.8
8.8.4.4
NetBIOS over Tcpip. . . . . . . . : Enabled
wmic
这个命令行工具用于管理Windows系统,可以通过它获取硬件和软件的详细信息。
使用方法:
wmic os get caption, version, manufacturer, model
输出示例:
Caption Microsoft Windows Server 2019 Standard
Version 10.0.17763
Manufacturer Microsoft Corporation
Model PowerEdge R740XD
getmac
这个命令用于显示网络适配器的物理地址(MAC地址)。
使用方法:
getmac /fo csv /nh
输出示例:
Physical Address,Device Name
00-1A-2B-3C-4D-5E,Ethernet
00-2B-3C-4D-5E-6F,Wi-Fi
netstat
这个命令用于显示网络连接、路由表、接口统计等网络相关信息。
使用方法:
netstat -an
输出示例:
Active Connections
Proto Local Address Foreign Address State
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING
TCP 192.168.1.100:139 0.0.0.0:0 LISTENING
TCP 192.168.1.100:50234 93.184.216.34:80 ESTABLISHED
UDP 0.0.0.0:123 *:*
UDP 192.168.1.100:137 *:*
UDP 192.168.1.100:138 *:*
ipconfig /renew
刷新DHCP配置。通过这些命令,您可以全面了解Windows服务器的基本信息和网络配置情况。如果遇到特定问题,可以根据输出结果进一步诊断和解决。
领取专属 10元无门槛券
手把手带您无忧上云