Set DNS using Powershell


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:




Sharing is caring!

Previous articleGet Domain Group Members
Next articleSet Office 365 Out Of Office using PowerShell
About Me ? I Guess i would start by saying i am a family guys and full time SysAdmin and Tech Junky. This Blog is my first attempt to share information about daily issues i come across as a SysAdmin as well as some new deployments i am part of. Topics that i will cover will mostly be about Office 365,Windows,Exchange as well as Active Directory. I hope some of my Blog posts helps someone #LiveLongAndBeLazy #Exchange #Office 365 #ActiveDirectory #Hyper-V


Please enter your comment!
Please enter your name here