Mr_G_Grant
Enthusiast
Enthusiast

Cannot find function

Jump to solution

Hi Guys,

I'm having issues using the Active Directory plugin in vRO. I'm trying to get the .getComputer method to work but it always fails saying "Cannot find function". Any ideas? Below is snippet of what im doing.

Attribute created called AD (type: AD:ActiveDirectory) and mapped to my domain.

Attribute created called result (type: AD_Computer)

Attribute created called adh (type: AD_Host)

Next i have a scriptable task with the following basic code.

result = AD.getAllDomainControllerComputers(adh)

System.log(result);

vRO.jpg

Any ideas? I also noticed when i try to use the auto dot notation completion on the AD object it does not work. It works fine with other object types e.g. virtual machine, Ad user.

I'm using the Active Directory plugin (Version 3.0.3) on vRealize Orchestrator 7.2.0.4629841.

Thanks

Mr G

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee

Hi Mr G,

ActiveDirectory is not a regular scripting object but a scripting singleton, so you cannot create instances/attributes of it; when you want to invoke a method on it, you should use directly the singleton name.

So instead of

result = AD.getAllDomainControllerComputers(adh);

you should use

result = ActiveDirectory.getAllDomainControllerComputers(adh);

View solution in original post

0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee

Hi Mr G,

ActiveDirectory is not a regular scripting object but a scripting singleton, so you cannot create instances/attributes of it; when you want to invoke a method on it, you should use directly the singleton name.

So instead of

result = AD.getAllDomainControllerComputers(adh);

you should use

result = ActiveDirectory.getAllDomainControllerComputers(adh);

View solution in original post

0 Kudos
Mr_G_Grant
Enthusiast
Enthusiast

That did the trick thank you very much llian!

0 Kudos