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.
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.
This will satisfy issue #114