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?
We have AD groups that manage what VLAN a user's system is associated with based on the user's department. I have custom command to change the PC group membership if the ... business rule. (I cannot select the command) is there a way to work around this?
I have a 'Before user account creation' business rule that starts as follows: If script 'Validate user exists' returns true then Do Nothing // rest of ... experiencing a bug where $Context.Cancel is not properly terminating the business rule. Thanks.
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.