Windows 命令行改主机名、加域、退域、更改IP
Windows 命令行改主机名、加域、退域、更改IP

Windows 命令行改主机名、加域、退域、更改IP

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

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

Title - Artist
0:00