PowerShell DNS Commands:Add-DnsServerStubZone
PowerShell DNS Commands » Add-DnsServerStubZone

Add-DnsServerStubZone

DNS Cmdlet: Add-DnsServerStubZone

Syntax:

Add-DnsServerStubZone [-LoadExisting][-MasterServers] <>IPAddress[]> [-ComputerName <>String>][-PassThru][-Name] <>String>[-ZoneFile <>String>] [-CimSession <>CimSession[]>][-ThrottleLimit <>Int32>][-AsJob][-WhatIf] [-Confirm][<>CommonParameters>]

Parameters and Description:

Parameters Description
LoadExisting (Type: SwitchParameter) This parameter is specified only for file-backed zones and it represents that the server loads an existing file for the zone.
MasterServers (Type: IPAddress[]) Specifies the list of IP addresses of the master servers of the zone; IPv4 as well as IPv6 addresses can be used.
NetworkId (Type: String) Denotes the network ID and prefix length for a reverse lookup zone. The following formats are used: A.B.C.D/prefix for IPv4 and 1111:2222:3333:4444::/prefix for IPv6 addresses.
ZoneFile (Type: String) Denotes the name of the zone file and this parameter is specified only for file-backed DNS.
ReplicationScope (Type: String) Specifies the partition to store AD-integrated zone. The valid values for this parameter are custom, domain, forest and legacy.
ComputerName (Type: String) Enter the IP address, NETBIOS name, FQDN or host name of the DNS server.
CimSession (Type: CimSession [] ) Runs the cmdlet on a remote computer or session. For example: the output of Get-CimSession or New-CimSession cmdlet. By default, the cmdlet is run on the local computer in the current session.
ThrottleLimit (Type: Int32) Specifies the maximum number of concurrent operations that can be allowed to run this cmdlet. If its value is 0 or not specified, PowerShell will calculate the right throttle limit automatically.

To know further on Add-DnsServerStubZone, please refer to this article.

Purpose of this cmdlet:

The Add-DnsServerStubZone cmdlet lets you add a stub zone, which is basically a copy of a DNS zone that contains records that identify the DNS servers for that zone.

Example:

Add-DnsServerStubZone -Name "west02.abc.com" -MasterServers "xxx.xx.xx.xxx"
-PassThru -ZoneFile "west02_abc.dns"

The above command adds west02.abc.com as a file-backed stub zone and mentions a master server and also PassThru parameter for the output.

Did you know that you can do the following computer objects-related tasks without any scripts:

  • List all computers running on a specific operating system.
  • Create, enable, or disable computers in bulk.
  • Generate report to see all the computers in a domain which are trusted for delegation, and more.

Download the 30-day free trial of ADManager Plus and check out the rest of the features the powerful tool offers!

Active Directory Management and Reporting Solution

ADManager Plus is a web-based tool which offers the capability to manage Active Directory attributes in bulk easily using CSV files or templates. Get built-in reports on users and export them in CSV, PDF, HTML and XLSX formats.

Unravel end-to-end Active Directory management with ADManager Plus

  •  
  •  
  •  
  • By clicking 'Schedule a personalized demo' you agree to processing of personal data according to the Privacy Policy.
AD User Management / Reports
Active Directory Reporting
Active Directory Management
Related Products