Hi,
we use the rule "Before adding a user to group" for approval workflow on the groups OU. How can we skip this rule if the added user is located under a special OU? The added user is not the initiator. We use Win 2008 R2 and Adaxes 2012.1 latest fix-release.
Regards
Hello,
You can use the If PowerShell script returns true condition:
Right-click the Send operation for approval action and click Add Condition in the context menu.
Select the If PowerShell script returns true condition in the list.
Paste the following script to the Script edit box.
$Context.ConditionIsMet = $True $OUDN = "OU=Sales,DC=company,DC=com" # TODO: modify me $newMember = $Context.BindToObjectByDN("%member%") $memberOUPath = New-Object "Softerra.Adaxes.Adsi.AdsPath" $newMember.Parent if ($memberOUPath.DN -ieq $OUDN) { $Context.ConditionIsMet = $False }
Modify the script: set the distinguished name (DN) of your Organizational Unit to the variable called $OUDN. To get the DN of an Organizational Unit:
Hello Eugene,
Thank you very much. It works! The
$newMember = $Context.BindToObjectByDN("%member%")
was the missing twist. ;)
Let's say I have a Business Rule that is fired prior to adding members to a group. Is it possible to get the number of objects being added to that group as ... that tells me that 6 objects will be added or is each added user treated completely independently?
In a business rule, I'd like to pass Adaxes variables into a powershell script that I'll run. For example, pass %username% into the script so it can be used inside the script.
The closest operation I figure is "modfying exchange properties" of a user but not sure how I can filter the conditions to match. It's possible I could ... ? Was also looking at adm-MsExchMailboxCalendarPermissions but havent played around with that yet.
Rule 1. we have a business rule which disables a user account after updating a user. It then does some other actions. Rule 2. we have a business rule which performs ... 2 then triggered immediately and the flow of control handed back to rule 1 to continue?
Hi team, I have a follow up to this question https://www.adaxes.com/questions/14234/business-after-adding-members-powershell-script-executed Let me explain my setup A rule- ... area% failed due to the following exception: $($_.Exception.Message)", "Error") }