This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Is it possible to set the hostname field on an IPAM record using PowerShell?

We can easily get first available IP with

Invoke-SwisVerb $swis IPAM.SubnetManagement GetFirstAvailableIp @("199.10.1.0", "24")

And also easily set it to "Used" with

Invoke-SwisVerb $swis IPAM.SubnetManagement ChangeIPStatus  @("199.10.1.1", "Used")

So why can't we easily set the hostname on the record as well?

Is there a way to achieve this natively with the PowerShell module?
Parents
  • So, to answer this we need to first know how IPAM hostname resolution works. 

    https://support.solarwinds.com/SuccessCenter/s/article/How-hostname-resolution-works-in-IPAM?language=en_US

    IPAM relies 100% on your DNS server to populate the hostname field.

    So while you can't directly edit the hostname via the API, you can invoke the IPAM.IPAddressManagement.AddDNSARecordWithPtr verb to create both a DNS A record and associated PTR. Upon the next scan of that IP, IPAM will check with DNS for a valid reverse DNS entry and if one is found, it'll populate the Hostname field with it.

  • Hi Chad, That's what I suspected, and thanks for clearing that up. As for my Linux deployments, this is fine and a welcome feature to be able to create the DNS record on demand with the AddDNSARecordWithPtr, (which creates "static" DNS records). But for my Windows servers, I prefer not to use that method since Windows is capable of registering itself with DNS, and creating "dynamic" records where we can take advantage of scavenging if the record ever becomes orphaned. It's probably not going to be a show stopper though as long as setting the IPAM IP record to "Used" prevents subsequent server deployments from grabbing that record in IPAM and causing conflicts. I'll run this by my team to see if this will be an acceptable solution for replacing our current IPAM implementation with Infoblox. I do have one more question for you though. You mentioned that the scan relies on a "valid reverse DNS entry", so are you saying that if a PTR record doesn't exist to accompany the "A" record, then this hostname field won't get populated?

  • Nevermind, the document you posted does confirm that a PTR record is required. Thanks again for your reply.

Reply Children
No Data