1 person found this helpful
You need to use ActiveDirectory.rename(), not AD_User.rename().
Check ActiveDirectory.rename() documentation in vRO API Explorer, there is an example how the parameters look like.
This helped, thank you!
I'll do my best to explain this simply so others that may be starting off with vRO can have an easier time than I did :-)
I ended up creating inputs for the scriptable task that required the AD:User type and the AD:OrganizationalUnit type. This object is then consumed by ActiveDirectory.rename(). I did find the documentation slightly confusing, but it became more clear when I realized you can both rename and/or move objects using ActiveDirectory.Rename().
According to the API Explorer, the parameters for ActiveDirectory.Rename are:
- From (string)
Think of this as the reference for everything else you do. It requires the distinguished name, not the object itself.
- To (string)
Think of this as the name of the object in the destination. In my testing, if you pass anything but "'CN='+objAdUser.name", the user object will be named something you don't intend.
- New_Parent (string)
This is simply the container you want the object to live in.
If any of this is incorrect, please let me know!
Here's the example snippet:
Inputs: NewOU (AD:OrganizationalUnit), objAdUser (AD:User)
Please elaborate more on this solution.