@echo off
for /f "tokens=2 delims=:" %%a in ('ipconfig /all^|find "Host Name"') do set pcName=%%a
set pcName=%pcName:~1%
WMIC computersystem where Name="%pcName%" call Rename Name="新的电脑名称写在这里"
wmic computersystem where Name="%COMPUTERNAME%" call JoinDomainOrWorkgroup Name="新的工作组名称写在这里"
echo netsh interface IP Set Address "本地连接" Static IP地址 需要改的话说一声