mirror of
https://github.com/dsccommunity/DnsServerDsc.git
synced 2026-04-27 06:45:51 +03:00
Page:
DnsServerCache
Pages
DnsRecordA
DnsRecordAScoped
DnsRecordAaaa
DnsRecordAaaaScoped
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
Home
xDnsRecord
xDnsRecordMx
xDnsRecordSrv
xDnsServerADZone
xDnsServerClientSubnet
xDnsServerConditionalForwarder
xDnsServerDiagnostics
xDnsServerForwarder
xDnsServerPrimaryZone
xDnsServerRootHint
xDnsServerSecondaryZone
xDnsServerSetting
xDnsServerZoneAging
xDnsServerZoneScope
xDnsServerZoneTransfer
No results
3
DnsServerCache
dscbot edited this page 2025-04-12 12:03:02 +00:00
Table of Contents
Parameters
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
| DnsServer | Key | System.String | The host name of the Domain Name System (DNS) server, or use 'localhost' for the current node. |
|
| EnablePollutionProtection | Write | System.Boolean | Specifies whether DNS filters name service (NS) resource records that are cached. Valid values are False ($false), which caches all responses to name queries; and True ($true), which caches only the records that belong to the same DNS subtree. When you set this parameter value to False ($false), cache pollution protection is disabled. A DNS server caches the Host (A) record and all queried NS resources that are in the DNS server zone. In this case, DNS can also cache the NS record of an unauthorized DNS server. This event causes name resolution to fail or to be appropriated for subsequent queries in the specified domain. When you set the value for this parameter to True ($true), the DNS server enables cache pollution protection and ignores the Host (A) record. The DNS server performs a cache update query to resolve the address of the NS if the NS is outside the zone of the DNS server. The additional query minimally affects DNS server performance. |
|
| IgnorePolicies | Write | System.Boolean | Specifies whether to ignore policies for this cache. | |
| LockingPercent | Write | System.UInt32 | Specifies a percentage of the original Time to Live (TTL) value that caching can consume. Cache locking is configured as a percent value. For example, if the cache locking value is set to 50, the DNS server does not overwrite a cached entry for half of the duration of the TTL. If the cache locking percent is set to 100 that means the DNS server will not overwrite cached entries for the entire duration of the TTL. |
|
| MaxKBSize | Write | System.UInt32 | Specifies the maximum size, in kilobytes, of the memory cache of a DNS server. If set to 0 there is no limit. |
|
| MaxNegativeTtl | Write | System.String | Specifies how long an entry that records a negative answer to a query remains stored in the DNS cache. Minimum value is '00:00:01' and maximum value is '30.00:00:00' |
|
| MaxTtl | Write | System.String | Specifies how long a record is saved in cache. Minimum value is '00:00:00' and maximum value is '30.00:00:00'. If the TimeSpan is set to '00:00:00' (0 seconds), the DNS server does not cache records. |
|
| StoreEmptyAuthenticationResponse | Write | System.Boolean | Specifies whether a DNS server stores empty authoritative responses in the cache (RFC-2308). | |
| Reasons | Read | DnsServerReason[] | Returns the reason a property is not in desired state. |
Description
The DnsServerCache DSC resource manages cache settings on a Microsoft Domain Name System (DNS) server.
Examples
Example 1
This configuration will change the cache settings on the DNS server.
Configuration DnsServerCache_SetCacheSettings_Config
{
Import-DscResource -ModuleName 'DnsServerDsc'
Node localhost
{
DnsServerCache 'SetCacheSettings'
{
DnsServer = 'localhost'
EnablePollutionProtection = $true
StoreEmptyAuthenticationResponse = $true
IgnorePolicies = $false
LockingPercent = 100
MaxKBSize = 0
MaxNegativeTtl = '00:15:00'
MaxTtl = '1.00:00:00'
}
}
}
This file contains invisible Unicode characters
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
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.