常用命令
打开命令提示符或者PowerShell窗口,需要右键选择以管理员身份运行
系统
# 查看系统信息
msinfo32
# 系统配置,启动服务,启动程序等
msconfig
# 远程桌面连接
mstsc
# 启用Telnet Client
Enable-WindowsOptionalFeature -FeatureName TelnetClient -Online
# 启用.Net 3.5
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:D:\sources\sxs
# 获取安装的应用程序
Get-ItemProperty -path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*,HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*
# 扫描所有保护的系统文件的完整性,并尽可能修复有问题的文件
sfc /scannow
# 以其他用户身份运行cmd
runas /noprofile /user:contoso\admin01 cmd
# 刷新组策略
gpupdate /force
# 查看当前组策略,生成.html文件
gpresult /h GPreport.html
网络
# 查看IP地址信息
ipconfig /all
# 刷新DNS
ipconfig /flushdns
# 释放IP地址信息
ipconfig /release
# 查看ARP缓存
arp -a
# ping
ping www.baidu.com
# tracert
tracert www.baidu.com
# DNS记录查询(A记录,MX记录等)
nslookup
# 重置Winsock目录
netsh winsock reset
# 查看路由信息
route print
# 添加路由记录
route add 10.20.0.0 mask 255.255.0.0 192.168.12.1
# 删除路由记录
route delete 10.20.0.0
# 查看网络连接信息(协议,本地地址,外部地址,状态)
netstat -an
netstat -an | find "ESTABLISHED"
netstat -an | find "LISTENING"
磁盘
# 磁盘分区管理
diskpart
KMS
# Windows 10 KMS
slmgr.vbs /?
# Office 2019 KMS
cscript "C:\Program Files\Microsoft Office\Office16\OSPP.vbs"
KMS Product Key
Product | Key |
Windows 10 Pro | W269N-WFGWX-YVC9B-4J6C9-T83GX |
Windows 11 Pro | W269N-WFGWX-YVC9B-4J6C9-T83GX |
Office 标准版 2019 | 6NWWJ-YQWMR-QKGCB-6TMB3-9D9HK |
Office 专业增强版 2019 | NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP |
https://docs.microsoft.com/en-us/windows-server/get-started/kms-client-activation-keys
https://docs.microsoft.com/zh-cn/DeployOffice/vlactivation/gvlks?redirectedfrom=MSDN
域环境
# 查询域用户信息
net user /domain demo.user01
Get-ADUser demo.user01
工具
Remote Desktop Connection Manager
Remote Server Administration Tools
Bginfo
TreeSize
DeviceTool
Device Viewer
Windows USB/DVD Download Tool
Windows Update Troubleshooter
Account Lockout Status(LockoutStatus.exe)
System repair disk
DaRT (Microsoft Diagnostics and Recovery Toolset)
WinDbg
Process Explorer
Process Monitor
PStools