Variable adHost is set to the AD:adHost you want to search
Or use “Server.findAllForType(“AD:AdHost”)” and use a loop to search each domain.
Search for Computer Name
vmName = “NST-CORE-01”;
adComputers = ActiveDirectory.search(“ComputerAD”,vmName,adHost);
System.log(adComputers.length);
Search for Organizational Unit
ouName = “Finance”;
adOUs = ActiveDirectory.search(“Organizational Unit”,
ouName, adHost);
System.log(adOUs.length);
Search for User
user = “bmacinnes”;
adUsers = ActiveDirectory.search(“User”,user,adHost);
System.log(adUsers.length);
Leave a Reply