====== Windows 2008 R2 SP1 的无人值守应答配置文件 ======
/Windows/panther/Unattend.xml 文件内容:
false
0
007f:00000804
zh-CN
zh-CN
zh-CN
xinNIANhao2019
true
true
2
Administrator
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "$wmi = Get-WmiObject -Class Win32_NetworkAdapter -Filter "netconnectionstatus=2"; $wmi.NetConnectionID = 'iEthernet'; $wmi.Put()"
rename nic name
1
netsh interface ip set address name="iEthernet" static 144.172.126.32 255.255.255.0 144.172.126.1 1
set static ip address
2
netsh interface ip set dns name="iEthernet" static 8.8.8.8
set dns server
3
netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=135 name="Block_TCP-135"
Block_TCP-135
4
netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=137 name="Block_TCP-137"
Block_TCP-137
5
netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=139 name="Block_TCP-139"
Block_TCP-139
6
netsh advfirewall firewall add rule dir=in action=block protocol=TCP localport=445 name="Block_TCP-445"
Block_TCP-445
7
netsh advfirewall firewall add rule dir=in action=allow protocol=TCP localport=3389 name="Allow_TCP-3389"
Allow_TCP-3389
8
netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
Allow_ping9
9
xinNIANhao2019
true
true
true
China Standard Time
===== /Windows/panther/Unattend.xml 文件内容 =====
$wmi = Get-WmiObject -Class Win32_NetworkAdapter -Filter "netconnectionstatus=2"
$wmi.NetConnectionID = 'iEthernet'
$wmi.Put()