I'm writing a little script that will pull used IPs from specific blocks, and check to see if they are in any of our Visio drawings.
When I'm running a query though I'm getting a lot of duplicate entries which seems a little odd to me. I tried pulling every entity (difficult to do because we can't use SELECT *) I could from the table and I am not seeing any difference in the returned results.
Here's an example of the entities I'm looking to get:
$OrionIPAM_GroupNode = Get-SwisData $swis "SELECT GroupId, ParentId, Address, AddressMask, CIDR, FriendlyName, Comments, VLAN, LastDiscovery FROM IPAM.GroupNode WHERE GroupID = '964'"
This returns 4 results that are all the same.
Is there something wrong with our database?
Is there a hidden index record I'm not seeing from my other query of all entities?
Should I be querying on a different ID?
The idea here is to eventually grab every used IP from every subnet that has "MGMT" somewhere in the Description field in IPAM, which seems to be the 'Comments' field in the IPAM.GroupNode table.
Thanks!