0 votes

I'm working on trying to update a script for updating office addresses on-demand. I'd like to leverage ADSI for this and I see that you can clear all condition sets before recreating but I'm looking to just modify a specific one within the script.

Is this possible? I'm either seeing a documentation gap here or I'm running past the method needed for this.

Thanks!

by (40 points)
0

Hello,

Sorry for the confusion, but we are not quite sure what exactly you need to achieve. Is it a business rule that you need to update using a script? If so, please, provide a screenshot of the configuration and describe what exactly the script should do in all the possible details with live examples. You can post the screenshot here or send to us at support@adaxes.com.

0

Similarly to this script: https://www.adaxes.com/sdk/SampleScripts.ReplacingActionsAndConditionsOfCustomCommand/

During new user objects being created, I have a business rule set to triger a script named Set Office Address. Within that script, I have multiple condition sets like this.

image.png

I would like to not clear all existing actions, since I have multiple if statements, but rather target a specific action/condition set. For example, if the "physicalDeliveryOfficeName" property equals "ABC", delete that condition set, and create a new one like the one listed.

1 Answer

0 votes
by (272k points)

Hello,

The only way to do that is to check all the existing action sets and their conditions for the one with the required statement. Once you find it, you can delete the action set and then add a new one.

0

Right, that's the area I'm stuck on.

I need to be calling ResolveValueReferences() or is there another function for this?

0

Hello,

That is not what you need. To obtain an action set, you need to use $rule.ConditionedActions.GetObject. Examples from the following article might be helpful: https://www.adaxes.com/sdk/IAdmBusinessRuleConditionedActions2. Also, have a look at the following script from our repository: https://www.adaxes.com/script-repository/all-business-rules-custom-commands-scheduled-reports-and-scheduled-tasks-s394.htm.

Related questions

0 votes
1 answer

Hi Currently we have an Adaxes system set up for our Service Desk staff to log into and manage users / groups etc this is currently assigned by assigning the Service ... there be any limiting factors such as licencing requirements for this? Thanks in advance.

asked Dec 15, 2020 by R_C (70 points)
0 votes
1 answer

Hi Guys, Short question. In our organisation we have a buch of the security group that have a specific "class". The class is simple number stored in the ExtensionAttribute1. I'd ... tried to do the something like that with ADSI :cry: Could you please help me?

asked Dec 8, 2014 by axmaster (510 points)
0 votes
1 answer

I am trying to do a bulk update of a few custom properties that I added. I read this article Custom Properties in Search & PowerShell?. But I am not able to retrieve ... able to get other AD properties using the Get, e.g, user.Get("samAccountName") works

asked Jun 20, 2013 by sdavidson (730 points)
0 votes
1 answer

I inherited an Adaxes environment and have been reviewing and cleaning up the business rules that populate a user's address information at creation. All of these rules are configured ... intended, so what is the down side in doing multiple "If" action sets?

asked May 26, 2023 by TAE (70 points)
0 votes
1 answer

When we create a shared mailbox, we create an associated mail-enabled security group. In the security group I want to populate the description field with the name of the shared mailbox ... How can I get just the "name" of the shared mailbox versus the full DN?

asked Feb 4, 2021 by atnorman (120 points)
3,347 questions
3,048 answers
7,788 comments
545,042 users