Set-DnsServerCache (DnsServer) (2024)

  • Reference
Module:
DnsServer

Modifies cache settings for a DNS server.

Syntax

Set-DnsServerCache [-StoreEmptyAuthenticationResponse <Boolean>] [-MaxKBSize <UInt32>] [-PollutionProtection <Boolean>] [-ComputerName <String>] [-LockingPercent <UInt32>] [-MaxNegativeTtl <TimeSpan>] [-MaxTtl <TimeSpan>] [-PassThru] [-IgnorePolicies <Boolean>] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

The Set-DnsServerCache cmdlet modifies cache settings for a Domain Name System (DNS) server.

Examples

Example 1: Set the maximum cache size on a DNS server

PS C:\> Set-DnsServerCache -MaxKBSize 10240 -ComputerName "Win12S-05.DNSServer-01.Contoso.com"

This command sets the maximum cache size to 10,240 KB on a DNS server that has an FQDN of Win12S-05.DNSServer-01.Contoso.com.

Example 2: Set maximum Time-To-Live durations

PS C:\> Set-DnsServerCache -MaxTTL 02.00:00:00 -MaxNegativeTtl 00.00:20:00

This command sets the the maximum TTL to 2 days and the maximum negative TTL to 20 minutes.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

The cmdlet immediately returns an object that represents the job and then displays the command prompt.You can continue to work in the session while the job completes.To manage the job, use the *-Job cmdlets.To get the job results, use the Receive-Job cmdlet.

For more information about Windows PowerShell background jobs, see about_Jobs.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-CimSession

Runs the cmdlet in a remote session or on a remote computer.Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet.The default is the current session on the local computer.

Type:CimSession[]
Aliases:Session
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ComputerName

Specifies a DNS server.The acceptable values for this parameter are: an IPv4 address, an IPv6 address, and any other value that resolves to an IP address, such as fully qualified domain name (FQDN), host name, or NETBIOS name.

Type:String
Aliases:Cn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-IgnorePolicies

Indicates whether to ignore policies for this cache.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LockingPercent

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.By default, the cache locking percent value is 100.This value means that the DNS server will not overwrite cached entries for the entire duration of the TTL.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-MaxKBSize

Specifies the maximum size, in kilobytes, of the memory cache of a DNS server.

Type:UInt32
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-MaxNegativeTtl

Specifies how long (1 to 2592000 seconds) an entry that records a negative answer to a query remains stored in the DNS cache. The value must be provided as a TimeSpan.The default setting is 15 minutes.

Type:TimeSpan
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-MaxTtl

Specifies how long (0 to 2592000 seconds) a record is saved in cache. The value must be provided as a TimeSpan.If the TimeSpan is set to 0 seconds, the DNS server does not cache records.The default setting is one day (86,400 seconds).

Type:TimeSpan
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

Returns an object representing the item with which you are working.By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PollutionProtection

Specifies whether DNS filters name service (NS) resource records that are cached.Valid values are zero, which caches all responses to name queries and is the default value; and one, which caches only the records that belong to the same DNS subtree.

When you set this parameter value to 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, 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.

For more information about DNS cache locking, see DNS Cache Locking.For more information about cache pollution protection, see Securing the DNS Server Service.For more information about NS resource records, see Managing resource records.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-StoreEmptyAuthenticationResponse

Specifies whether a DNS server stores empty authoritative responses in the cache (RFC-2308).The default value is True.

Type:Boolean
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet.If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs.The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

CimInstance

  • RFC 2308
  • Clear-DnsServerCache
  • Get-DnsServerCache
  • Show-DnsServerCache
Set-DnsServerCache (DnsServer) (2024)
Top Articles
How does perfect competition influence consumer and producer surplus? | TutorChase
Bitcoin könnte das Gold des 21. Jahrhunderts werden
Aberration Surface Entrances
Skylar Vox Bra Size
Farepay Login
Martha's Vineyard Ferry Schedules 2024
P2P4U Net Soccer
Nation Hearing Near Me
Swimgs Yung Wong Travels Sophie Koch Hits 3 Tabs Winnie The Pooh Halloween Bob The Builder Christmas Springs Cow Dog Pig Hollywood Studios Beach House Flying Fun Hot Air Balloons, Riding Lessons And Bikes Pack Both Up Away The Alpha Baa Baa Twinkle
Ncaaf Reference
Strange World Showtimes Near Cmx Downtown At The Gardens 16
Zoebaby222
Dump Trucks in Netherlands for sale - used and new - TrucksNL
Raleigh Craigs List
How Much Is Tay Ks Bail
Foxy Brown 2025
Outlet For The Thames Crossword
Rqi.1Stop
Gina Wilson All Things Algebra Unit 2 Homework 8
Silky Jet Water Flosser
Lacey Costco Gas Price
100 Gorgeous Princess Names: With Inspiring Meanings
Skepticalpickle Leak
Yu-Gi-Oh Card Database
Imagetrend Elite Delaware
Ryujinx Firmware 15
Ff14 Sage Stat Priority
Manuel Pihakis Obituary
Quality Tire Denver City Texas
Ourhotwifes
A Small Traveling Suitcase Figgerits
#scandalous stars | astrognossienne
Pensacola 311 Citizen Support | City of Pensacola, Florida Official Website
How are you feeling? Vocabulary & expressions to answer this common question!
Vision Source: Premier Network of Independent Optometrists
Mixer grinder buying guide: Everything you need to know before choosing between a traditional and bullet mixer grinder
Culver's of Whitewater, WI - W Main St
How much does Painttool SAI costs?
Craigslist Mexicali Cars And Trucks - By Owner
301 Priest Dr, KILLEEN, TX 76541 - HAR.com
A Comprehensive 360 Training Review (2021) — How Good Is It?
Wilson Tattoo Shops
sacramento for sale by owner "boats" - craigslist
Levi Ackerman Tattoo Ideas
War Room Pandemic Rumble
Spurs Basketball Reference
Backpage New York | massage in New York, New York
Canvas Elms Umd
Used Sawmill For Sale - Craigslist Near Tennessee
Anthony Weary Obituary Erie Pa
Ranking 134 college football teams after Week 1, from Georgia to Temple
Latest Posts
Article information

Author: Nathanial Hackett

Last Updated:

Views: 5898

Rating: 4.1 / 5 (52 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Nathanial Hackett

Birthday: 1997-10-09

Address: Apt. 935 264 Abshire Canyon, South Nerissachester, NM 01800

Phone: +9752624861224

Job: Forward Technology Assistant

Hobby: Listening to music, Shopping, Vacation, Baton twirling, Flower arranging, Blacksmithing, Do it yourself

Introduction: My name is Nathanial Hackett, I am a lovely, curious, smiling, lively, thoughtful, courageous, lively person who loves writing and wants to share my knowledge and understanding with you.