Hi, I’m trying to fix our missing DNS Reverse lookups with Powershell.
I have a CSV file with the headers ‘Name’ and last two octets of an ‘IP’ address that looks like below:
name,ip
workstation1.famoso.com,169.120
workstation2.famoso.com,169.121
My goal is to reverse the IP value so it displays as 120.169
Then create a new object with the Name and reversed IP.
name,iprev
workstation1.famoso.com,120.169
workstation2.famoso.com,121.169
Then import the Name and reversed IP using the command below
[crayon-5fb49a6b2a73d134542913/]
The problem I am having is creating the new object with Name and reversed IP so I can capture that in a variable.
I figured out how to reverse the IP:
[crayon-5fb49a6b2a745009075351/]
How can i create a new object with Name and IPrev that looks like below?
name,IPrev
workstation1.famoso.com,120.169
workstation2.famoso.com,121.169
I would like to capture that to a variable $servers1 and | to Add-DnsServerResourceRecordPtr
****the commands below can add, get, and remove a single PTR record from DNS
[crayon-5fb49a6b2a747983151124/]