Hello,
I am trying to write a Java application that will query the WMI on windows hosts within domains to obtain their mac address and dns name. I can run the script via exec or using a few of the jars I have found on the internet but none that I have seen allow me to impersonate an AD account when I run the query.
I would like to be able to specify the account that the query runs as(an admin of that domain), the program may run on a machine that is not in the domain or there might be two domains that I will query.
I've looked at JACOB and com4J but can't find an example of it doing impersonation.
Also I'm not an advanced programmer by any means so apologies if I've missed something glaringly obvious
Thanks in advance.