Create Deprovisioning Policy with a script moving users to another OU

Hello,

I would like to create a deprovisioning policy, which moves the user to another OU, with a script.

I have already a script, which creates a deprovisioning policy, but I cannot find out how to configure the built in mechanism to move a user to a different OU. In worst case I can write a script to move the user in the PostDeprovisioning, but then I need an undo script, too and I must store the information of the original OU somewhere else.

Can anybody help here?

Many Thanks!

Parents
  • Finally I got it.

    I created manually a policy, copied the content of the edsaAPEListXML and used this string in my script for a new policy.

    Here is the code

    strSetting=value of the manual created policy

    Set ContainerObject=GetObject("EDMS://" & strPolicyContainerDN)
    Set poObject = ContainerObject.Create("edsPolicyObject", strPolicyObjectDN)
    poObject.Put "edsaPolicyType", 1
    poObject.Put "edsaAPEListXML", strSetting
    poObject.Put "description", "Deprovisioning policy for users."
    poObject.SetInfo

Reply
  • Finally I got it.

    I created manually a policy, copied the content of the edsaAPEListXML and used this string in my script for a new policy.

    Here is the code

    strSetting=value of the manual created policy

    Set ContainerObject=GetObject("EDMS://" & strPolicyContainerDN)
    Set poObject = ContainerObject.Create("edsPolicyObject", strPolicyObjectDN)
    poObject.Put "edsaPolicyType", 1
    poObject.Put "edsaAPEListXML", strSetting
    poObject.Put "description", "Deprovisioning policy for users."
    poObject.SetInfo

Children