By David Wiseman (Administrator)published 10 May 2010
My Rating:
Vote
Rating:
Not Rated
Views:40235

Bulk AD Users - Bulk Modify

Overview

The Bulk Modify dialog is a simple way to update user account attributes for a large number of user accounts.  The Bulk Modify method is appropriate where you want to update all users to have the same attribute value, or the attribute value can be based on other existing attributes.  For example, you might want to change the logon hours for selected user accounts to prevent them from logging in out of hours.  You might want to force all users to change their password at next logon, or add all users in the "Accounting" ou to the "Accounting" group.  The ability to base updates on existing attributes also allows you to change the display name format to "surname, firstname" or to update your username format to "firstname.surname".  A large number of other update scenarios are also supported.  For updates that require a different value for each user account and the update can't be based on existing data, you might want to consider the CSV Update or the Edit In Excel feature. (E.g. Data from your HR database like firstname, surname etc)

Getting Started

After selecting the user accounts you want to modify, launch the Bulk Modify dialog by selecting the Bulk Modify button on the toolbar.

The Bulk Modify dialog (pictured at the top of the page) will be displayed.  The dialog has been designed to look similar to the user dialog in Active Directory Users and Computers - this will make it easier for you to find the attributes you want to modify as the user interface is already familiar to you.

You will find that the textboxes that you normally use to enter information are disabled in the "Bulk Modify" user interface.  If you want to modify an attribute you will need to select the checkbox located to the left of the textbox.  Once the checkbox has been checked you will be able to enter data into the textbox - this also provides a signal to the application that the attribute selected is to be modified.  Most checkboxes also have an intermediate state (The checkbox is checked but also greyed out) that is used to clear the attribute. If you enter a zero length string into the textbox this will not clear the attribute and normally results in a failed attribute modification.

Once you have specified the required updates, click the "Update" button to apply your changes.  After the application has finished applying updates to Active Directory, the Bulk Modify Results dialog is displayed to show the success/failure of the update. You can view the details of the update and rollback the update if required. 

XML Placeholders

The ability to modify attributes in bulk would be of limited use without some additional intelligence.  For example, you might want to specify that the Display Name attribute is set to "Surname, Firstname" or specify the user profile path to be "\\server\share\username".  This is where XML Placeholders come in.  XML Placeholders allow you to do all of the above plus text find and replacement and other forms of string manipulation.  Some common options are automatically entered for you by various hyperlinks in the application. In the Bulk Modify dialog pictured at the top of the page, the "Surname, Firstname" hyperlink next to the "Display Name" attribute was clicked to insert the required XML placeholders into the "Display Name" textbox.

If you want to set a single value for all user accounts, the XML placeholders feature can be ignored - just enter the value required in the textbox.  To base an update on existing attribute you will include placeholders that will be substituted for an existing attribute value when the update is performed.  The placeholders are specially formatted in XML tags to allow the application to recognise that the text is to be replaced with an existing attribute value.  The name of the attribute is inserted between "" and "", like the value specified in the Bulk Modify dialog shown at the top of the page:

<attr>sn</attr>, <attr>givenName</attr>

The part "sn" will be replaced by the "sn" (surname) attribute, the ", " part remains unchanged and the"givenName" part is replaced by the "givenName" (first name) attribute.  The new value would look something like "Wiseman, David" or "Doe, John".

Note: If you are wondering how I knew to use "sn" for "Surname" and "givenName" for first name, please consult the Active Directory Schema guide on this website.

XML Placeholder Examples

The easiest way to learn what you can do with XML placeholders is probably through a series of examples provided below:

FirstName.Surname:

 <attr>givenName</attr>.<attr>sn</attr>

Surname, FirstName:

<attr>sn</attr>, <attr>givenName</attr>

Convert company name to UPPERCASE:

<attr transform="UPPER">company</attr>

Convert display name to lowercase:

<attr transform="LOWER">displayName</attr>

Convert display name to Proper Case:

<attr transform="PROPERCASE">displayName</attr>

Replace "WiseSoft" with "WiseSoft Corporation":

<attr findtext="WiseSoft" replacewith="WiseSoft Corporation">company</attr>

Remove whitespace from description attribute:

From start and end:

<attr transform="TRIM">description</attr>

From end only:

<attr transform="RTRIM">description</attr>

From start only:

<attr transform="LTRIM">description</attr>

First Letter of FirstName + Surname:

<attr transform="LEFT(1)">givenName</attr><attr>sn</attr>

Last 4 characters of Telephone Number (Extension?):

<attr transform="RIGHT(4)">telephoneNumber</attr>

3rd and 4th character of EmployeeID

SUBSTIRNG(start,length)

<attr transform="SUBSTRING(3,2)">employeeID</attr>

Convert first letter of First Name to Uppercase

<attr transform="LEFT(1)" transform2="UPPER">givenName</attr><attr transform="SUBSTRING(1,*)">givenName</attr>

NULL attribute values

XML Placeholders will generate a validation error by default if the attribute specified does not have a value.  The application will not attempt to modify the value.  You can change this behaviour by specifying a "nullvalue" attribute in the XML Placeholder.  If the attribute does not have a value, the text specified for "nullvalue" will be used.

The following example will replace any null values for the surname (sn) attribute with a blank string.

<attr nullvalue="">sn</attr>, <attr>givenName</attr>

If the surname didn't have a value but the first name was set to "David", the placeholder above would produce ", David".  You might just want to use the value of the first name attribute where the surname attribute is null.  You can do this by specifying the ", " as a postfixtext attribute in the XML placeholder.  e.g.

<attr nullvalue="" postfixtext=", ">sn</attr><attr nullvalue="">givenName</attr>

The prefixtext and postfixtext attributes are ignored when the attribute has a null value.




  Post Comment
Order By:  
User Comments
      
GasperS
Posted On: 2/13/2012 6:03:52 AM

Great tool.

I just have one question: How do you clear an attribute value using BulkUpdate?
If I try to leave blank value I get an error...

Thank you and best regard, Gasper

David Wiseman (Administrator)
United Kingdom
Posted On: 8/18/2012 10:11:42 AM

Click the checkbox until there is a greyed out check to clear an attribute value. The input box will also be greyed out with the text "Clear Attribute" displayed.

JosPhantasmE
Posted On: 11/20/2012 12:34:53 AM [Edited 11/20/2012 12:35:14 AM]

This is an amazing tool, but I have a question, Is it possible to modify the "Environment" section in windows server 2008 R2, because when I try to do it, it just give me an error saying that I'm missing a 2003 .dll file which is obviously not compatible with windows server 2008 R2

Thank you very much.

mrclean09
Posted On: 8/31/2014 11:00:54 PM

Awesome tool!!!!! This just saved me a ton of time, I am going to donate for sure. Thank you.


Posted On: 9/28/2018 7:29:54 AM

jinyi928
pandora charms
moncler outlet
ugg boots outlet
longchamp
basketballl shoes
adidas shoes
bottega veneta
mbt shoes
supreme clothing
coach outlet

lacoste polo
coach outlet
christmas presents
off white jordan
adidas nmd
longchamp outlet
canada goose outlet
canada goose outlet
louboutin shoes
canadian goose
clarks outlet
michael kors outlet
skechers shoes
new balance shoes
canada goose
moncler outlet
coach outlet
true religion
salomon shoes
off white shoes
clarks outlet
james harden shoes
ray ban sunglasses
ralph lauren polo
pandora
champion sportswear

tory burch outlet
coach outlet
kate spade outlet
michael kors outlet
mlb jerseys
nike tn
ralph lauren polo
oakley sunglasses
true religion jeans
champion clothing
christian louboutin outlet
christian louboutin shoes
adidas superstar
clarks shoes
ralph lauren polo
red bottom shoes
pandora jewelry
ralph lauren uk
red bottom shoes
moncler outlet
canada goose jackets
coach outlet
coach outlet online
canada goose outlet
coach outlet
converse trainer
ecco shoes
nike outlet
superdry uk
coach outlet online
ugg outlet clearance
canada goose outlet
kate spade handbags
adidas yeezy
coach outlet
jordan uk
canada goose jacket
hermes belt
hogan shoes
jordans
ray ban sunglasses
supreme
ray ban sunglasses
ray ban sunglasses
true religion jeans outlet
north face
coach handbags
ugg boots
off white clothing
canada goose
ralph lauren polo
christian louboutin shoes
ralph lauren uk
canada goose clothing
coach outlet
ugg outlet boots
coach factory outlet
air max 90
christian louboutin outlet
christian louboutin
off white outlet
ugg outlet
jordan shoes
pandora charms
asics shoes
nike shoes outlet
christian louboutin outlet
moncler jackets

ed hardy uk
fitflops clearance
ugg boots
christian louboutin outlet
michael kors outlet
canada goose outlet
pandora outlet
tod's outlet
manolo blahnik
canada goose outlet
red bottom shoes
nike shoes
salomon shoes
nike blazers
coach outlet
dsquared2
ralph lauren
fitflops clearance
north face
true religion jeans
canada goose jackets
pandora jewelry
true religion jeans outlet
jordans
louboutin shoes
asics shoes
coach outlet
nhl jersey
jordan clothing
yeezy boots 350
nike shoes
nike shoes
coach outlet online
nike outlet factory
jordan 8
fitflops clearance
ralph lauren polo
jordan shoes
canada goose outlet
jordan 4
adidas yeezy
giuseppe zanotti
kate spade outlet
true religion
canada goose
nike clothing
louboutin shoes
nike air max
mbt shoes
issey miyake
ferragamo belt
air max 90
ultra boost 3.0
birken stock
moncler outlet
ugg boots
canada goose outlet
moncler outlet
moncler jackets
hogan shoes
coach factory outlet
louboutin shoes
stussy
ugg boots clearance
true religion jeans
soccer shoes
pandora outlet
pandora charms
ugg boots
ecco shoes
canada goose outlet
kate spade outlet
jordan shoes
nba jerseys
reebok outlet
adidas clothing
louboutin shoes
michael kors outlet
fitflops clearance
adidas clothing
vibram five fingers
coach outlet
ray ban sunglasses
nike shoes
fidget spinner
ralph lauren polo
christian louboutin
pandora jewelry
coach outlet online
pandora charms
clarks shoes
christian louboutin
coach outlet
coach outlet factory
coach outlet
kate spade outlet
moncler jacket
ugg outlet

canada goose outlet
mbt shoes
ugg outlet
ferragamo shoes
valentino shoes
red bottom shoes
christian louboutin shoes
pandora outlet
prada handbags
ralph lauren polo
moncler outlet
coach factory outlet
coach outlet
christian louboutin shoes
kate spade outlet
michael kors outlet
ralph lauren polo
longchamp outlet
ralph lauren uk
hermes belt
coach outlet
adidas outlet
hugo boss
kate spade
nike shoes
canada goose outlet
hugo boss
louboutin shoes
jordan shoes
prada shoes
ugg boots clearance
christian louboutin outlet
supreme clothing
ugg outlet
air max 90
dsquared2
christian louboutin outlet
christian louboutin
nike huarache
coach factory outlet