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
}