-
Notifications
You must be signed in to change notification settings - Fork 55
xDnsRecordSrv
Johan Ljunggren edited this page Jul 9, 2021
·
2 revisions
⚠️ DEPRECATED! The resource has been replaced by DnsRecordSrv in the DSC resource module DnsServerDsc.
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Zone | Key | String | Specifies the name of a DNS zone. | |
SymbolicName | Key | String | Service name for the SRV record. eg: xmpp, ldap, etc. | |
Protocol | Key | String | Service transmission protocol ('TCP' or 'UDP') |
TCP , UDP
|
Port | Key | UInt16 | The TCP or UDP port on which the service is found | |
Target | Key | String | Specifies the Target Hostname for the SRV record | |
Priority | Required | UInt16 | Specifies the Priority value of the SRV record. | |
Weight | Required | UInt16 | Specifies the Weight value of the SRV record. | |
TTL | Write | String | Specifies the TTL value of the SRV record. Value must be in valid TimeSpan format. | |
DnsServer | Write | String | Name of the DnsServer to create the record on. | |
Ensure | Write | String | Should this DNS resource record be present or absent |
Present , Absent
|
The xDnsRecordSrv DSC resource manages SRV DNS records against a specific zone on a Domain Name System (DNS) server.
This configuration will ensure a DNS SRV record exists for XMPP that points to chat.contoso.com with a priority of 10, weight of 20 and default TTL of 1 hour.
Configuration xDnsRecordSrv_config
{
Import-DscResource -ModuleName 'xDnsServer'
Node localhost
{
xDnsRecordSrv 'TestRecord'
{
Zone = 'contoso.com'
SymbolicName = 'xmpp'
Protocol = 'tcp'
Port = 5222
Target = 'chat.contoso.com'
Priority = 10
Weight = 20
Ensure = 'Present'
}
}
}
This configuration will ensure a DNS SRV record exists for XMPP that points to chat.contoso.com with a priority of 20, weight of 50 and TTL of 5 hours.
Configuration xDnsRecordSrv_full_config
{
Import-DscResource -ModuleName 'xDnsServer'
Node localhost
{
xDnsRecordSrv 'TestRecord Full'
{
Zone = 'contoso.com'
SymbolicName = 'xmpp'
Protocol = 'tcp'
Port = 5222
Target = 'chat.contoso.com'
Priority = 20
Weight = 50
TTL = '05:00:00'
Ensure = 'Present'
}
}
}
This configuration will remove a specified DNS SRV record. Note that Priority and Weight are mandatory attributes, but their values are not used to determine which record to remove.
Configuration xDnsRecordSrv_Remove_config
{
Import-DscResource -ModuleName 'xDnsServer'
Node localhost
{
xDnsRecordSrv 'RemoveTestRecord'
{
Zone = 'contoso.com'
SymbolicName = 'xmpp'
Protocol = 'tcp'
Port = 5222
Target = 'chat.contoso.com'
Priority = 0
Weight = 0
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