用户工具

站点工具


drserver:unattendxmlforwindows2008r2sp1

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
drserver:unattendxmlforwindows2008r2sp1 [2018/08/31 11:12] liujiadrserver:unattendxmlforwindows2008r2sp1 [2018/10/26 21:47] (当前版本) liujia
行 34: 行 34:
             <FirstLogonCommands>             <FirstLogonCommands>
                 <SynchronousCommand wcm:action="add">                 <SynchronousCommand wcm:action="add">
-                    <CommandLine>powershell.exe $wmi = get-wmiobject win32_networkadapter -filter "netconnectionstatus=2" ; $wmi.NetConnectionID = "iEthernet; $wmi.Put()</CommandLine>+                    <CommandLine>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "$wmi = Get-WmiObject -Class Win32_NetworkAdapter -Filter "netconnectionstatus=2"; $wmi.NetConnectionID = 'iEthernet'; $wmi.Put()"</CommandLine>
                     <Description>rename nic name</Description>                     <Description>rename nic name</Description>
                     <Order>1</Order>                     <Order>1</Order>
行 67: 行 67:
                     <Description>Block_TCP-445</Description>                     <Description>Block_TCP-445</Description>
                     <Order>7</Order>                     <Order>7</Order>
-                </SynchronousCommand>+                </SynchronousCommand>               
                 <SynchronousCommand wcm:action="add">                 <SynchronousCommand wcm:action="add">
                     <CommandLine>netsh advfirewall firewall add rule dir=in action=allow protocol=TCP localport=3389 name="Allow_TCP-3389"</CommandLine>                     <CommandLine>netsh advfirewall firewall add rule dir=in action=allow protocol=TCP localport=3389 name="Allow_TCP-3389"</CommandLine>
                     <Description>Allow_TCP-3389</Description>                     <Description>Allow_TCP-3389</Description>
                     <Order>8</Order>                     <Order>8</Order>
-                </SynchronousCommand>                                                                                                  +                </SynchronousCommand> 
 +                <SynchronousCommand wcm:action="add"> 
 +                    <CommandLine>netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow</CommandLine> 
 +                    <Description>Allow_ping9</Description> 
 +                    <Order>9</Order> 
 +                </SynchronousCommand>                                                                                                                  
             </FirstLogonCommands>                       </FirstLogonCommands>          
             <UserAccounts>             <UserAccounts>
行 89: 行 94:
     <cpi:offlineImage cpi:source="catalog:d:/temp/install_windows server 2012 r2 serverdatacenter.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />     <cpi:offlineImage cpi:source="catalog:d:/temp/install_windows server 2012 r2 serverdatacenter.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
 </unattend> </unattend>
 +</file>
 +
 +===== /Windows/panther/Unattend.xml 文件内容 =====
 +
 +<file xml C:\Windows\panther\nic.ps1>
 +$wmi = Get-WmiObject -Class Win32_NetworkAdapter -Filter "netconnectionstatus=2"
 +
 +$wmi.NetConnectionID = 'iEthernet'
 +
 +$wmi.Put()
 </file> </file>
drserver/unattendxmlforwindows2008r2sp1.1535685148.txt.gz · 最后更改: 2018/08/31 11:12 由 liujia