Condividi tramite


Set-DnsServerZoneAging

Set-DnsServerZoneAging

Configures DNS aging settings for a zone.

Syntax

Parameter Set: Set1
Set-DnsServerZoneAging [-Name] <String> [[-Aging] <Boolean> ] [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-NoRefreshInterval <TimeSpan> ] [-PassThru] [-RefreshInterval <TimeSpan> ] [-ScavengeServers <IPAddress[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-DnsServerZoneAging cmdlet configures aging settings for a Domain Name System (DNS) server zone.

A resource record can remain on a DNS server after the resource is no longer part of the network. Aging settings determine when a record can be removed, or scavenged, as a stale record.

Parameters

-Aging<Boolean>

Indicates whether to enable aging and scavenging for a zone. Aging and scavenging are not enabled by default.

For a value of $True, a DNS server refreshes time stamps for resource records when the server receives a dynamic update request. This enables DNS servers to scavenge resource records.

For a value of $False, DNS servers do not refresh time stamps for resource records and do not scavenge resource records.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-AsJob

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String>

Specifies a DNS server. If you do not specify this parameter, the command runs on the local system. You can specify an IP address or any value that resolves to an IP address, such as a fully qualified domain name (FQDN), host name, or NETBIOS name.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a zone. This cmdlet is relevant only for primary zones.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NoRefreshInterval<TimeSpan>

Specifies the length of time as a TimeSpan object. This value is the interval between the last update of a timestamp for a record and the earliest time when the timestamp can be refreshed. The minimum value is 0. The maximum value is 8760 hours.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RefreshInterval<TimeSpan>

Specifies the refresh interval as a TimeSpan object. During this interval, a DNS server can refresh a resource record that has a non-zero time stamp.

If a resource record that has a non-zero time stamp is not refreshed for a period of the sum the values defined in the NoRefreshInterval parameter and the RefreshInterval parameter, a DNS server can remove that record during the next scavenging.

Do not select a value smaller than the longest refresh period of a resource record registered in the zone.

The minimum value is 0. The maximum value is 8760 hours. The default value is the same as the DefaultRefreshInterval property of the zone DNS server.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ScavengeServers<IPAddress[]>

Specifies an array of IP addresses for DNS servers. These servers can scavenge records in this zone. If you do not specify any scavenge servers, any primary DNS server that is authoritative for the zone can scavenge.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Management.Infrastructure.CimInstance#DnsServerZoneAging

Examples

Example 1: Set a scavenging server

This command enables aging for a domain named west01.contoso.com and specifies a scavaging server.

PS C:\> Set-DnsServerZoneAging west01.contoso.com -Aging $true -ScavengeServers 172.18.1.1 -PassThru -Verbose