Skip to content

Set DNS using Powershell

Last updated on Jun 29, 2017

The purpose of this article is to show case how to add a new A record to a DNS zone using PowerShell.

Here is a quick look at the available Syntax for : Add-DnsServerResourceRecordA

Add-DnsServerResourceRecordA [-AllowUpdateAny] [-CreatePtr] [-Name] <String> [-IPv4Address] <IPAddress[]> [-ComputerName <String>] [-TimeToLive <TimeSpan>] [-ZoneName] <String> [-AgeRecord] [-PassThru] [-ZoneScope <String>] [-VirtualizationInstance <String>] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [-WhatIf] [-Confirm] [<CommonParameters>]

Now lets look at a quick example:

Let’s add this is a quick small script:

[/crayon]

 

#ThatLazyAdmin

Sharing is caring!

Published inActive DirectoryDNSPowerShellWindowsWindows Server 2008Windows Server 2012Windows Server 2016

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *