DSCResources/DSC_DnsServerAddress/en-US/about_DnsServerAddress.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 |
.NAME
DnsServerAddress .DESCRIPTION This resource is used to control a node's DNS Server address(s). .PARAMETER InterfaceAlias Key - String Alias of the network interface for which the DNS server address is set. .PARAMETER AddressFamily Key - String Allowed values: IPv4, IPv6 IP address family. .PARAMETER Address Write - StringArray The desired DNS Server address(es). Exclude to enable DHCP. .PARAMETER Validate Write - Boolean Requires that the DNS Server addresses be validated if they are updated. It will cause the resource to throw a 'A general error occurred that is not covered by a more specific error code.' error if set to True and specified DNS Servers are not accessible. .EXAMPLE 1 Configure DNS Server for the Ethernet adapter. Configuration DnsServerAddress_Config { Import-DscResource -Module NetworkingDsc Node localhost { DnsServerAddress DnsServerAddress { Address = '127.0.0.1' InterfaceAlias = 'Ethernet' AddressFamily = 'IPv4' Validate = $true } } } .EXAMPLE 2 Configure primary and secondary DNS Server addresses on the Ethernet adapter. Configuration DnsServerAddress_PrimaryAndSecondary_Config { Import-DscResource -Module NetworkingDsc Node localhost { DnsServerAddress PrimaryAndSecondary { Address = '10.0.0.2','10.0.0.40' InterfaceAlias = 'Ethernet' AddressFamily = 'IPv4' Validate = $true } } } .EXAMPLE 3 Enabling DHCP for the IPv4 Address and DNS on the adapter with alias 'Ethernet'. Configuration DnsServerAddress_EnableDHCP_Config { Import-DscResource -Module NetworkingDsc Node localhost { NetIPInterface EnableDhcp { InterfaceAlias = 'Ethernet' AddressFamily = 'IPv4' Dhcp = 'Enabled' } DnsServerAddress EnableDhcpDNS { InterfaceAlias = 'Ethernet' AddressFamily = 'IPv4' } } } |