Hello

I need to do some checks (using a script) before moving a user to another OU.


I need to put the "new location" in a variable. How do I do that ?

- Thanks

by (2.6k points)

1 Answer

by (216k points)
Best answer
0 votes

Hello,

The following script will do the job. The Distinguished Name (DN) of the new container where the user will be moved will be available in $containerDN.

$container = $Context.Action.TargetContainer
if ($container)
{
    $containerDN = $container.Get("distinguishedName")
}
else
{
    $containerDN = $Context.Action.TargetContainerDnTemplate
}

Related questions

I'm wanting to modify the subject of the approval email that is sent to an approver so it stands out better. What I would like is to add the name of the user ... , %name% or anything else related to name is that of the person being emailed the approval.

asked Mar 14 by matt_nz (20 points)
0 votes
1 answer

Example: If a user has a ' in theirname: Fred J O'neal. Normally the username is set as %lastname:lower,4%%firstname:lower,3%%initials:lower% Problem is o'nefrej would be the result. ... name", "Information") $username = #this is what I'm not sure how to do?

asked Dec 6, 2022 by mightycabal (1.2k points)
0 votes
1 answer

I understood that following this logic, the link directs me to the user's viewing page. %adm-WebInterfaceUrl%ViewObject.aspx?guid= ... success %adm-WebInterfaceUrl%EditObject.aspx?guid=%objectGUID% %adm-WebInterfaceUrl%ModifyObject.aspx?guid=%objectGUID%

asked Nov 15, 2022 by Simone.Vailati (500 points)
0 votes
1 answer

Thanks for the info. I'm now grabbing the %adm-ManagerUserName% value, but need to remove the final 21 characters of it so it contains only their username and not our ... this in the PowerShell Script Editor for my business rule, I get the following error:

asked Mar 11, 2021 by mkvidera (60 points)
0 votes
1 answer

We are new ADAXES customers and we would like to know if DNS is integration in the tool is planned in the future releases of the product ?

asked Dec 18, 2020 by fdemartino (20 points)
0 votes
1 answer