0 votes

Hello,

I have trouble understanding the instruction listed here:
https://www.adaxes.com/script-repositor ... s-s516.htm

What should I put into $propertyForSearch and $valuesForSearch variables?

# Search settings
$propertyForList = "Office" # TOOD: modify me
$propertyForSearch = "????" # TOOD: modify me
$valuesForSearch = @("????", "????") # TOOD: modify me

# Property Pattern settings
$patternName = "User Pattern" # TODO: modify me
$propertyToUpdate = "Office" # TODO: modify me

My goal is to update Office pattern to provide a list of Office locations that are already being used in AD. Since Adaxes is not the only system adding new locations to AD.

Thank you.

by (760 points)

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello,

The $propertyForSearch variable should contain the LDAP name of the attribute, whose values must match at least one value specified in the array of the $valuesForSearch variable. For example, when the variables are specified like the following:

$propertyForList = "physicalDeliveryOfficeName"
$propertyForSearch = "description"
$valuesForSearch = @("Value1", "Value2")
$patternName = "User Pattern"
$propertyToUpdate = "physicalDeliveryOfficeName"

The value of the Office property will be added to the list of values allowed for the Office property in the User Pattern Property Pattern if the Office property of the account contains any value and the Description property of the account equal Value1 or Value2.

For your information, LDAP name of the Office property is physicalDeliveryOfficeName. So, if you want to update the list of allowed values for the property in a Property Pattern, the values of the $propertyForList and $propertyToUpdate variables should be specified as physicalDeliveryOfficeName.

0

But I need to allow all values found in this attribute, I do not have a list of items beforehand and if I had, there would be no need to search for them.
How do I make this to return all the options used for Office in AD?

0

Hello,

You can just comment (or remove) the following line in the script:

$filter.Append([Softerra.Adaxes.Ldap.FilterBuilder]::CreateOrred($propertyForSearch, [System.String[]]$valuesForSearch))

Related questions

0 votes
1 answer

Let me preface by saying that I am a Lotus Notes Developer that is very new to Adaxes and am learning as I go. I've created a form in Adaxes that has several fields ... and if so, can you point me to some examples? Your help will be greatly appreciated.

asked Mar 18, 2015 by sandramnc (870 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)
0 votes
1 answer

We are trying to enforce better consistency for user attribute values in a domain but without overly restricting user input when modifying/creating users. Is it possible to ... to these fields and create Custom Commands to change them which is very tedious.

asked Mar 21, 2019 by Staj (350 points)
0 votes
1 answer

We have a form to used by our HR Reps to create non-employee records. There are two fields on the form that are auto-generated via a property pattern: Full Name ( ... changed to cause this new behavior? Nothing has changed with our property pattern set-up...

asked Aug 30, 2016 by sandramnc (870 points)
0 votes
1 answer

Is there an option to load the possibles values of the Property Pattern, from SQL or other external sources?

asked Aug 5, 2013 by sdavidson (730 points)
3,346 questions
3,047 answers
7,772 comments
544,970 users