1

Most attributes in MSAD are single-valued and pose no problem. I am familiar with the dsquery user -samid jdoe | dsmod -webpg "http://some.url/" method. However, some attributes are multi-valued, such as telephone number and webpage. These values can be managed through the Active Directory Users & Computers Microsoft Console (dsa.msc) via the dialogue shown by clicking on the "Other..." button, but I'd really rather script the modifications. It seems to me that dsmod & dsget do not support multi-value retrieval and editing; only the first value of the set seems to be accesible. Am I correct? If I am not correct, I would appreciate a syntax example. If I am correct, would you please recommend an alternative scriptable tool that can handle multi-value attributes? The more "official and supported" the tool, the better.

2 Answers 2

1

First, -webpg isn't the multivalued list of web pages. Using the webpage other button in the GUI, that list of websites is call url. To query it:

dsquery * "<full dn>" -l  -attr url
test2
test

However dsmod doesn't have a way to modify it. PowerGUI may work, I use admod.

admod -safety 1 -b "full DN" "url:+:test3"

Then, I can do the query again and see the new value:

dsquery * "<full dn>" -l  -attr url
test3
test2
test

You can browse the full schema to find the LDAP name of other values.

1
  • Thanks, you hit all my main points, and corrected me on distinction between webpg and url attributes. I regret to hear that MS does not have a suitable "official" option, but it looks like the extant third party stuff will be good tools and have good reputations.
    – Justin
    Feb 25, 2011 at 0:17
1

Have you taken a look at PowerGUI? It's a good at making mass changes to AD since it manipulates powershell under the hood.

1
  • Thanks for your suggestion. I'd never heard of PowerGUI, havent' quite yet dipped into PowerShell. We're overdue for that, I suppose. We already use Quest's TOAD product and have been happy with that, and I see that PowerGUI is also a Quest product, so now I'm really intrigued.
    – Justin
    Feb 25, 2011 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.