Table of Contents
xDnsServerPrimaryZone
⚠️ DEPRECATED! The resource has been replaced by DnsServerPrimaryZone in the DSC resource module DnsServerDsc.
Parameters
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| Name | Key | String | Name of the DNS Server primary zone | |
| ZoneFile | Write | String | Name of the DNS Server primary zone file. If not specified, defaults to 'ZoneName.dns'. | |
| DynamicUpdate | Write | String | Primary zone dynamic DNS update option. Defaults to 'None'. |
None, NonSecureAndSecure |
| Ensure | Write | String | Whether the DNS zone should be present or absent | Present, Absent |
Description
The xDnsServerPrimaryZone DSC resource manages a standalone file-backed Primary zone on a given Domain Name System (DNS) server.
Examples
Example 1
This configuration will add a file-backed classful reverse primary zone using the resource default parameter values.
Configuration xDnsServerPrimaryZone_AddClassfulReversePrimaryZone_Config
{
Import-DscResource -ModuleName 'xDnsServer'
Node localhost
{
xDnsServerPrimaryZone 'AddPrimaryZone'
{
Name = '1.168.192.in-addr.arpa'
}
}
}
Example 2
This configuration will add a file-backed classless reverse primary zone using the resource default parameter values.
Configuration xDnsServerPrimaryZone_AddClasslessReversePrimaryZone_Config
{
Import-DscResource -ModuleName 'xDnsServer'
Node localhost
{
xDnsServerPrimaryZone 'AddPrimaryZone'
{
Name = '64-26.100.168.192.in-addr.arpa'
}
}
}
Example 3
This configuration will add a file-backed primary zone using the resource default parameter values.
Configuration xDnsServerPrimaryZone_AddPrimaryZoneUsingDefaults_Config
{
Import-DscResource -ModuleName 'xDnsServer'
Node localhost
{
xDnsServerPrimaryZone 'AddPrimaryZone'
{
Name = 'demo.contoso.com'
}
}
}
Example 4
This configuration will add a file-backed primary zone using the resource default parameter values.
Configuration xDnsServerPrimaryZone_AddPrimaryZoneWithSpecificValues_Config
{
Import-DscResource -ModuleName 'xDnsServer'
Node localhost
{
xDnsServerPrimaryZone 'AddPrimaryZone'
{
Ensure = 'Present'
Name = 'demo.contoso.com'
ZoneFile = 'demo.contoso.com.dns'
DynamicUpdate = 'NonSecureAndSecure'
}
}
}
Example 5
This configuration will remove a file-backed primary zone.
Configuration xDnsServerPrimaryZone_RemovePrimaryZone_Config
{
Import-DscResource -ModuleName 'xDnsServer'
Node localhost
{
xDnsServerPrimaryZone 'RemovePrimaryZone'
{
Ensure = 'Absent'
Name = 'demo.contoso.com'
}
}
}
Example 6
This configuration will remove a file-backed primary zone.
Configuration xDnsServerPrimaryZone_RemoveReversePrimaryZone_Config
{
Import-DscResource -ModuleName 'xDnsServer'
Node localhost
{
xDnsServerPrimaryZone 'RemovePrimaryZone'
{
Ensure = 'Absent'
Name = '1.168.192.in-addr.arpa'
}
}
}
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Home
Resources
- DnsRecordA
- DnsRecordAaaa
- DnsRecordAaaaScoped
- DnsRecordAScoped
- DnsRecordCname
- DnsRecordCnameScoped
- DnsRecordMx
- DnsRecordMxScoped
- DnsRecordNs
- DnsRecordNsScoped
- DnsRecordPtr
- DnsRecordSrv
- DnsRecordSrvScoped
- DnsRecordTxt
- DnsRecordTxtScoped
- DnsServerADZone
- DnsServerCache
- DnsServerClientSubnet
- DnsServerConditionalForwarder
- DnsServerDiagnostics
- DnsServerDsSetting
- DnsServerEDns
- DnsServerForwarder
- DnsServerPrimaryZone
- DnsServerRecursion
- DnsServerRootHint
- DnsServerScavenging
- DnsServerSecondaryZone
- DnsServerSetting
- DnsServerSettingLegacy
- DnsServerZoneAging
- DnsServerZoneScope
- DnsServerZoneTransfer
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.