索引鍵Key

Key 指定的 IP 位址的唯一索引鍵。Key specifies a unique key for an IP address.

注意Note  

  • 此設定不會出現在屬性窗格中的 Windows 系統映像管理員 (Windows SIM) 直到您將新增IpAddress自動的安裝回應檔案。This setting does not appear in the Properties pane of Windows System Image Manager (Windows SIM) until you add IpAddress to the unattended installation answer file.

  • Key新增至回應檔案的屬性作為IpAddress項目。The value for Key is added to the answer file as an attribute of the IpAddress element. 屬性wcm:keyValue用來識別每個唯一的 IP 位址。The attribute wcm:keyValue is used to identify each unique IP address. 例如,您可以指定三個不同的 IP 位址所使用的金鑰值12,並3For example, you can specify three different IP addresses by using the Key value of 1, 2, and 3.

Values

索引鍵Key

指定的唯一索引鍵IpAddressSpecifies a unique key for the IpAddress. 索引鍵是一個字串。Key is a string.

有效的設定階段Valid Configuration Passes

特製化specialize

windowsPEwindowsPE

父階層Parent Hierarchy

Microsoft-Windows-TCPIP | Interfaces | Interface | UnicastIpAddresses | IpAddress | KeyMicrosoft-Windows-TCPIP | Interfaces | Interface | UnicastIpAddresses | IpAddress | Key

套用至Applies To

如需此元件支援的架構與 Windows 版本的清單,請參閱Microsoft-Windows-TCPIPFor a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-TCPIP.

XML 範例XML Example

下列的 XML 輸出會顯示如何設定 TCP/IP。The following XML output shows how to configure TCP/IP.

<component name="Microsoft-Windows-TCPIP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Interfaces>
   <!-- Add static IP address (192.168.0.1/24, ffff:1::3/48) & route (12.34.0.0/16) to interface with identifier "Ethernet 1" -->      <Interface wcm:action="add">
         <Ipv4Settings>
            <DhcpEnabled>true</DhcpEnabled> 
            <Metric>20</Metric> 
            <RouterDiscoveryEnabled>false</RouterDiscoveryEnabled> 
         </Ipv4Settings>
         <Ipv6Settings>
            <DhcpEnabled>false</DhcpEnabled> 
            <Metric>30</Metric> 
            <RouterDiscoveryEnabled>true</RouterDiscoveryEnabled> 
         </Ipv6Settings>
      <Identifier>Ethernet 1</Identifier>
         <UnicastIpAddresses>
           <IpAddress wcm:action="add" wcm:keyValue="1">192.168.0.1/24</IpAddress>
           <IpAddress wcm:action="add" wcm:keyValue="2">ffff:1::3/48</IpAddress>
         </UnicastIpAddresses>
         <Routes>
            <Route wcm:action="add">
               <Identifier>1</Identifier> 
               <Metric>10</Metric> 
               <NextHopAddress>12.34.0.0</NextHopAddress> 
               <Prefix>16</Prefix> 
            </Route>
            <Route wcm:action="add">
               <Identifier>10</Identifier> 
               <Metric>29</Metric> 
               <NextHopAddress>12.34.56.0</NextHopAddress> 
               <Prefix>24</Prefix> 
            </Route>
         </Routes>
      </Interface>
      <Interface wcm:action="add">
         <Ipv4Settings>
            <DhcpEnabled>true</DhcpEnabled> 
            <Metric>20</Metric> 
            <RouterDiscoveryEnabled>false</RouterDiscoveryEnabled> 
         </Ipv4Settings>
         <Ipv6Settings>
            <DhcpEnabled>false</DhcpEnabled> 
            <Metric>10</Metric> 
            <RouterDiscoveryEnabled>true</RouterDiscoveryEnabled> 
         </Ipv6Settings>
         <Identifier>Local Area Connection</Identifier> 
         <UnicastIpAddresses>
            <IpAddress wcm:action="add" wcm:keyValue="1">123.45.67.8</IpAddress> 
            </UnicastIpAddresses>
         <Routes>
            <Route wcm:action="add">
               <Identifier>1</Identifier> 
               <Metric>10</Metric> 
               <NextHopAddress>12.34.0.0</NextHopAddress> 
               <Prefix>16</Prefix> 
            </Route>
         </Routes>
      </Interface>
   </Interfaces>
</component>

IpAddressIpAddress