whoami
ipconfig /all
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
systeminfo | findstr /B /C:"OS 名称" /C:"OS 版本"
echo %PROCESSOR_ARCHITECTURE%
set
wmic product get name,version
powershell "Get-WmiObject -class Win32_Product |Select-Object -Property name,version"
wmic service list brief
tasklist /v
wmic process list brief
wmic startup get command,caption
schtasks /query /fo LIST /v
net statistics workstation
net user
net user ErYao7
net localgroup administrators
query user || qwinsta
net config workstation
net session
netstat –ano
systeminfo
wmic qfe get Caption,Description,HotFixID,InstalledOn
net share
wmic share get name,path,status
route print
arp –a
netsh firewall set opmode disable (Windows Server 2003 系统及之前版本)
netsh advfirewall set allprofiles state off (Windows Server 2003 系统之后版本)
netsh firewall show config
Windows Server 2003 系统及之前版本,允许指定程序全部连接,命令如下:
netsh firewall add allowedprogram c:\nc.exe "allow nc" enable
Windows Server 2003 之后系统版本,情况如下:
netsh advfirewall firewall add rule name="pass nc" dir=in action=allow program="C:\nc.exe"
netsh advfirewall set currentprofile logging filename "C:\windows\temp\fw.log"
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
REG QUERY "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /V PortNumber
wmic path win32_terminalservicesetting where (__CLASS !="") call setallowtsconnections 1
wmic /namespace:\\root\cimv2\terminalservices path win32_terminalservicesetting where (__CLASS !="") call setallowtsconnections 1wmic /namespace:\\root\cimv2\terminals