The zone that we are managing for our example script is shown here: To update the zone, we have to use a CSV file which is located in the same directory as the script, or you can define the full drive letter and path with the $Input File variable if you so desire.The CSV file requires a header row which is name,type,address to give us our attributes for each object when we parse the file.This process assumes that your records are all located in the root if the zone you define with the $DNSZone variable.The idea is that you can take this concept and flavour to taste for your particular needs.It can be a standard Primary, or an Active Directory Integrated zone.Either type will work with the process we are creating here.
I’ve noted the updates in the following post: I have also updated the code below to reflect the new code.
An example CSV file for 2 values octet,host Name,zone Name 105,test Host06.testenv.local,18.104.22.168,test Host07.testenv.local,22.214.171.124,test Host08.testenv.local,126.96.36.199,test Host09.testenv.local,188.8.131.52,test Host10.testenv.local,3.168.192.This is new feature and can be only used with Power Shell 3.0 which is available in Windows 8 and Windows Server 2012 (or in other Windows versions as it was mentioned at the beginning of this article).
There are variety of DNS cmd-lets to manage DNS server and one of them is Add-DNSServer Resource Record PTR and we will use it in this article. We need to prepare script for multiple records creation.
After we verified zone existence we can start to creating records.
But before that let’s see how DNScmd syntax looks for single pointer (PTR) record.
After that we would know which parameters should be inserted into input file for the script.