Closed jvaldezjr1 closed 9 years ago
Starting after line 446 is where I inserted this code to write the targets to a file.
Added code to save the target list when AD is queried for hosts, and write data to a file. There was some replication issues with some AD objects, so I've also added code to resolve those. In some AD environments, when there are duplicate object names, AD will add the objectGUID to the Name displayed in the format of "hostname\0ACNF:ObjectGUID". If you expand the property Name, you get 2 lines returned, the hostname, and then CNF:ObjectGUID. Code will take the first line from that object and reassign it back into the targets list.
I created a pull request to merge the code to do this from my fork.
Thank you!
No problem!
Write the target list from "Get-Targets" to a file. This may be helpful later on to have this stored in a central location, or useful to run additional module against same set of hosts and not have to query AD again.