DSCResources/DSC_IPAddress/en-US/about_IPAddress.help.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
.NAME
IPAddress .DESCRIPTION This resource is used to control a node's IP address. This can be used in conjunction with disabling DHCP to set static IP addresses. .PARAMETER IPAddress Write - StringArray The desired IP address, optionally including prefix length using CIDR notation. .PARAMETER InterfaceAlias Key - String Alias of the network interface for which the IP address should be set. .PARAMETER AddressFamily Key - String Allowed values: IPv4, IPv6 IP address family. .PARAMETER KeepExistingAddress Write - Boolean Indicates whether or not existing IP addresses on an interface will be retained. .EXAMPLE 1 Disabling DHCP and adding a static IP Address for IPv6 and IPv4 using default prefix lengths for the matching address classes. Configuration IPAddress_AddingStaticIP_Config { Import-DscResource -Module NetworkingDsc Node localhost { NetIPInterface DisableDhcp { InterfaceAlias = 'Ethernet' AddressFamily = 'IPv4' Dhcp = 'Disabled' } # If no prefix is supplied IPv6 will default to /64. IPAddress NewIPv6Address { IPAddress = '2001:4898:200:7:6c71:a102:ebd8:f482' InterfaceAlias = 'Ethernet' AddressFamily = 'IPV6' } <# If no prefix is supplied then IPv4 will default to class based: - Class A - /8 - Class B - /16 - Class C - /24 #> IPAddress NewIPv4Address { IPAddress = '192.168.10.5' InterfaceAlias = 'Ethernet' AddressFamily = 'IPV4' } } } .EXAMPLE 2 Disabling DHCP and adding multiple static IP Addresses for IPv4 and IPv6. Configuration IPAddress_AddingMultipleStaticIP_Config { Import-DscResource -Module NetworkingDsc Node localhost { NetIPInterface DisableDhcp { InterfaceAlias = 'Ethernet' AddressFamily = 'IPv6' Dhcp = 'Disabled' } IPAddress NewIPv6Address { IPAddress = '2001:4898:200:7:6c71:a102:ebd8:f482/64','2001:4598:210:7:6d71:a102:ebe8:f483/64' InterfaceAlias = 'Ethernet' AddressFamily = 'IPV6' } IPAddress NewIPv4Address { IPAddress = '192.168.10.5/24','192.168.10.6/24' InterfaceAlias = 'Ethernet' AddressFamily = 'IPV4' } } } .EXAMPLE 3 Disabling DHCP and adding a static IP Address for IPv6 and IPv4 using specified prefixes in CIDR notation. Configuration IPAddress_AddingStaticIPWithPrefix_Config { Import-DscResource -Module NetworkingDsc Node localhost { NetIPInterface DisableDhcp { InterfaceAlias = 'Ethernet' AddressFamily = 'IPv6' Dhcp = 'Disabled' } IPAddress NewIPv6Address { IPAddress = '2001:4898:200:7:6c71:a102:ebd8:f482/64' InterfaceAlias = 'Ethernet' AddressFamily = 'IPV6' } IPAddress NewIPv4Address { IPAddress = '192.168.10.5/24' InterfaceAlias = 'Ethernet' AddressFamily = 'IPV4' } } } .EXAMPLE 4 Disabling DHCP and adding a static IP Address for IPv6 and IPv4 using default prefix lengths for the matching address classes. Any existing IP addresses will be retained on the network adapter. Configuration IPAddress_AddingStaticIPKeepSettings_Config { Import-DscResource -Module NetworkingDsc Node localhost { NetIPInterface DisableDhcp { InterfaceAlias = 'Ethernet' AddressFamily = 'IPv4' Dhcp = 'Disabled' } # If no prefix is supplied IPv6 will default to /64. IPAddress NewIPv6Address { IPAddress = '2001:4898:200:7:6c71:a102:ebd8:f482' InterfaceAlias = 'Ethernet' AddressFamily = 'IPV6' KeepExistingAddress = $true } <# If no prefix is supplied then IPv4 will default to class based: - Class A - /8 - Class B - /16 - Class C - /24 #> IPAddress NewIPv4Address { IPAddress = '192.168.10.5' InterfaceAlias = 'Ethernet' AddressFamily = 'IPV4' KeepExistingAddress = $true } } } |