cmd或powershell
设置静态ip:
netsh interface ip set addr "本地连接" static 192.168.0.1 255.255.255.0 192.168.0.254 1
netsh interface ip set dns "本地连接" static 221.6.4.66
netsh interface ip add dns "本地连接" 8.8.8.8 #手动设置多个dns
设置动态ip:
netsh interface ip set addr "本地连接" dhcp
netsh interface ip set dns "本地连接" dhcp
powershell
修改主机名:
netdom renamecomputer "当前主机名" /newname:"新主机名"
加域:
add-computer -domain "域名" -cred "域名授权用户" -passthru
退域:
remove-computer -credential "域名授权用户" -passthru -verbose; restart-computer
帮助:
get-help add-computer -example