Showing results for users - Scripting Blog [archived]

Jan 8, 2008
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Modify the Email Addresses of All the Users in an OU and Its SubOUs?

ScriptingGuy1
ScriptingGuy1

  Hey, Scripting Guy! I need to get a list of all the users in an OU and its subOUs, then change their email addresses so those addresses only user lowercase letters. How can I do that?-- TB Hey, TB. You know, we had to think twice before going ahead and answering this question. That’s not because this a particularly difficult question for u...

Scripting Guy!VBScriptActive Directory
Sep 13, 2006
Post comments count0
Post likes count0

How Can I Delete All the Users in an Active Directory Group?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I delete all the users in an Active Directory group?-- AA Hey, AA. You know, that’s something we Scripting Guys never thought about: a script that could eliminate all the users in a particular group. The only problem we have with that is: where do we start? For example, maybe we start with the teenagers a few houses d...

Scripting Guy!VBScriptActive Directory
Mar 22, 2006
Post comments count0
Post likes count0

How Can I Get a List of All the Users Who Have an Alternate Recipient?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I get a list of all the users who have an alternate recipient (altRecipient)?-- SA Hey, SA. You know, one of the great things about being a Scripting Guy is that we don’t ever have to know what we’re talking about; all we do have to know is how to write a script that does whatever it is you ask us to do and everyone’s...

Scripting Guy!VBScriptActive Directory
Oct 14, 2005
Post comments count0
Post likes count0

How Can I Add a User to a Group if That User Belongs to Two Other Groups?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I check to see if a user is in both group A and group B and, if so, add that user to Group C?-- DH Hey, DH. Good heavens, how are we supposed to know that?!? Sheesh. Sorry; we just always wanted to say that. Now that we have that out of our system, here’s a sample script that checks to see if Ken Myer belongs to both ...

Scripting Guy!VBScriptActive Directory
Apr 12, 2005
Post comments count0
Post likes count0

Hey, Scripting Guy! How Can I Bind to a User Account Using Something Other Than the CN Attribute?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Can I bind to an Active Directory account using the user’s mailNickname or their sAMAccoutName, something other than the CN?-- MB Hey, MB. When you bind to an account in Active Directory, you need to pass GetObject the account’s ADsPath. That means you need to use a line of code similar to this: The ADsPath is act...

Scripting Guy!VBScriptActive Directory