Skip to content

xDnsServerForwarder

Johan Ljunggren edited this page Jul 9, 2021 · 5 revisions

xDnsServerForwarder

⚠️ DEPRECATED! The resource has been replaced by DnsServerForwarder in the DSC resource module DnsServerDsc.

Parameters

Parameter Attribute DataType Description Allowed Values
IsSingleInstance Key String Specifies the resource is a single instance, the value must be 'Yes'. Yes
IPAddresses Write StringArray[] IP addresses of the forwarders
UseRootHint Write Boolean Specifies if you want to use root hint or not.
EnableReordering Write Boolean Specifies whether to enable the DNS server to reorder forwarders dynamically.
Timeout Write UInt32 Specifies the number of seconds that the DNS server waits for a response from the forwarder. The minimum value is 0, and the maximum value is 15.

Description

The xDnsServerForwarder DSC resource manages the DNS forwarder list of a Domain Name System (DNS) server. If the parameter EnableReordering is set to $false then the preferred forwarder can be put in the series of forwarder IP addresses.

Examples

Example 1

This configuration will set the DNS forwarders

Configuration xDnsServerForwarder_set_config
{
    Import-DscResource -ModuleName 'xDnsServer'

    Node localhost
    {

        xDnsServerForwarder 'SetForwarders'
        {
            IsSingleInstance = 'Yes'
            IPAddresses      = @('192.168.0.10', '192.168.0.11')
            UseRootHint      = $false
        }
    }
}

Example 2

This configuration will remove all the DNS forwarders

Configuration xDnsServerForwarder_remove_config
{
    Import-DscResource -ModuleName 'xDnsServer'

    Node localhost
    {
        xDnsServerForwarder 'SetForwarders'
        {
            IsSingleInstance = 'Yes'
            IPAddresses      = @()
            UseRootHint      = $false
        }
    }
}

Example 3

This configuration will remove all the DNS forwarders

Configuration xDnsServerForwarder_SetUseRootHint_Config
{
    Import-DscResource -ModuleName 'xDnsServer'

    Node localhost
    {
        xDnsServerForwarder 'SetUseRootHints'
        {
            IsSingleInstance = 'Yes'
            UseRootHint      = $true
        }
    }
}

Example 4

This configuration will set the DNS forwarders and enable dynamic reordering.

Configuration xDnsServerForwarder_EnableReordering_Config
{
    Import-DscResource -ModuleName 'xDnsServer'

    Node localhost
    {
        xDnsServerForwarder 'SetUseRootHints'
        {
            IsSingleInstance = 'Yes'
            IPAddresses      = @('192.168.0.10', '192.168.0.11')
            UseRootHint      = $false
            EnableReordering = $true
        }
    }
}

Example 5

This configuration will set the DNS forwarders and disable dynamic reordering.

Configuration xDnsServerForwarder_DisableReordering_Config
{
    Import-DscResource -ModuleName 'xDnsServer'

    Node localhost
    {
        xDnsServerForwarder 'SetUseRootHints'
        {
            IsSingleInstance = 'Yes'
            IPAddresses      = @('192.168.0.10', '192.168.0.11')
            UseRootHint      = $false
            EnableReordering = $false
        }
    }
}

Example 6

This configuration will set the DNS forwarders and disable dynamic reordering.

Configuration xDnsServerForwarder_SetTimeout_Config
{
    Import-DscResource -ModuleName 'xDnsServer'

    Node localhost
    {
        xDnsServerForwarder 'SetUseRootHints'
        {
            IsSingleInstance = 'Yes'
            IPAddresses      = @('192.168.0.10', '192.168.0.11')
            UseRootHint      = $false
            Timeout          = 10
        }
    }
}
Clone this wiki locally