-
Notifications
You must be signed in to change notification settings - Fork 55
DnsRecordNsScoped
dscbot edited this page Aug 19, 2024
·
3 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
DomainName | Key | System.String | Specifies the fully qualified DNS domain name for which the NameServer is authoritative. It must be a subdomain the zone or the zone itself. To specify all subdomains, use the '*' character (i.e.: *.contoso.com). (Key Parameter) | |
NameServer | Key | System.String | Specifies the name server of a domain. This should be a fully qualified domain name, not an IP address (Key Parameter) | |
ZoneScope | Key | System.String | Specifies the name of a zone scope. (Key Parameter) |
The DnsRecordNsScoped DSC resource manages NS DNS records against a specific zone and zone scope on a Domain Name System (DNS) server.
This configuration will ensure a DNS NS record exists when only the mandatory properties are specified.
Configuration DnsRecordNsScoped_Mandatory_config
{
Import-DscResource -ModuleName 'DnsServerDsc'
Node localhost
{
DnsRecordNsScoped 'TestRecord'
{
ZoneName = 'contoso.com'
ZoneScope = 'external'
DomainName = 'contoso.com'
NameServer = 'ns.contoso.com'
Ensure = 'Present'
}
}
}
This configuration will ensure a DNS NS record exists when all properties are specified.
Configuration DnsRecordNsScoped_Full_config
{
Import-DscResource -ModuleName 'DnsServerDsc'
Node localhost
{
DnsRecordNsScoped 'TestRecord'
{
ZoneName = 'contoso.com'
ZoneScope = 'external'
DomainName = 'contoso.com'
NameServer = 'ns.contoso.com'
TimeToLive = '01:00:00'
DnsServer = 'localhost'
Ensure = 'Present'
}
}
}
This configuration will ensure a DNS NS record does not exist when mandatory properties are specified.
Note that not all mandatory properties are necessarily key properties. Non-key property values will be ignored when determining whether the record is to be removed.
Configuration DnsRecordNsScoped_Remove_config
{
Import-DscResource -ModuleName 'DnsServerDsc'
Node localhost
{
DnsRecordNsScoped 'TestRecord'
{
ZoneName = 'contoso.com'
ZoneScope = 'external'
DomainName = 'contoso.com'
NameServer = 'ns.contoso.com'
Ensure = 'Absent'
}
}
}
- DnsRecordA
- DnsRecordAaaa
- DnsRecordAaaaScoped
- DnsRecordAScoped
- DnsRecordCname
- DnsRecordCnameScoped
- DnsRecordMx
- DnsRecordMxScoped
- DnsRecordNs
- DnsRecordNsScoped
- DnsRecordPtr
- DnsRecordSrv
- DnsRecordSrvScoped
- DnsServerADZone
- DnsServerCache
- DnsServerClientSubnet
- DnsServerConditionalForwarder
- DnsServerDiagnostics
- DnsServerDsSetting
- DnsServerEDns
- DnsServerForwarder
- DnsServerPrimaryZone
- DnsServerRecursion
- DnsServerRootHint
- DnsServerScavenging
- DnsServerSecondaryZone
- DnsServerSetting
- DnsServerSettingLegacy
- DnsServerZoneAging
- DnsServerZoneScope
- DnsServerZoneTransfer