This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Create or Move Exchange Mailbox with Workflow

Hello,


we are using ActiveRoles Version 7.

We want to automate User creation with workflows, but i have problems with the Mailbox creation.

We want to minimize the Rules we are using, so my Test approach is on Policy and after this the Settings are applied to the new user depending of the OU where the user is created.

With Mailbox creation i have tested the following:
1. Workflow sets the attributes mailnickname and homeMDB; in a later Step edsaCreateMsEchangeMailbox --> not working with Error Message "external Mail Address is missing"

2. created a default Policy with automatic creation of the Mailbox in the selected Store, the Workflow sets edsahomeMDB and edsaMoveMailbox "True" --> Error edsahomeMDB is missing

3. created a default Policy with automatic creation of the Mailbox in the selected Store, the Workflow sets extensionAttribute8 with the DN of the correctStore; a second Workflow starts a script which reads the User DN, extensionAttribute8 and mailNickname and starts "Set-QADUser $user -Proxy -ObjectAttributes @{"edsaMoveMailbox"=$true;"edsaHomeMDB"=$strEDSAhomeMDB}" --> Error Access Denied"

When i start a powershell with the User of our ActiveRoles Server Service the command "Set-QADUser $user -Proxy -ObjectAttributes @{"edsaMoveMailbox"=$true;"edsaHomeMDB"=$strEDSAhomeMDB}" works fine.

Does someone has a solution or concept for this ?

Is there some way to delete a moverequest from exchange when it is finished ?


Regards,

Florian Ballangó

Parents
  • Glad to hear you made some progress!

    To answer your question about the Parameters - the idea with those is that you can pass information to your script through the parameters.  For example, a script calling a workflow and providing it some values for the parameters.

    In your case, I don't think there's any particular benefit.

    One thing I might suggest though is that for the DB selection, you create an OU->DB "mapping table" that you store in a file and load from the script.  Unless you have a very large number of databases, this will be a relatively efficient way to store your DB list outside of the script so that if you need to update it, you can just change the list and not be concerned about breaking the script.

    The table would look like this:

    London=DB1
    NewYork=DB2
    Chicago=DB3

    Assume we save this as "Mytable.txt"

    Here's some sample code:

    $LookupData = Get-Content -raw "Mytable.txt" | ConvertFrom-StringData

    $DBToFind = "London"

    $TargetDB = $LookupData[$DBToFind]

    ...returns "DB1"

Reply
  • Glad to hear you made some progress!

    To answer your question about the Parameters - the idea with those is that you can pass information to your script through the parameters.  For example, a script calling a workflow and providing it some values for the parameters.

    In your case, I don't think there's any particular benefit.

    One thing I might suggest though is that for the DB selection, you create an OU->DB "mapping table" that you store in a file and load from the script.  Unless you have a very large number of databases, this will be a relatively efficient way to store your DB list outside of the script so that if you need to update it, you can just change the list and not be concerned about breaking the script.

    The table would look like this:

    London=DB1
    NewYork=DB2
    Chicago=DB3

    Assume we save this as "Mytable.txt"

    Here's some sample code:

    $LookupData = Get-Content -raw "Mytable.txt" | ConvertFrom-StringData

    $DBToFind = "London"

    $TargetDB = $LookupData[$DBToFind]

    ...returns "DB1"

Children
No Data