Showing results for groups - Scripting Blog [archived]

Mar 10, 2005
Post comments count0
Post likes count0

How Can I Temporarily Add a Group to Another Active Directory Group?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I’d like to add an Active Directory group to a second group, but only for an hour; after an hour, I’d like remove that group from the second group. Can I do that with a script?-- JW Hey, JW. Well, this is definitely one of the more interesting questions we’ve received. As far as we know, there’s no way to put a time limit on ...

Scripting Guy!scripting techniquesVBScript
Dec 21, 2004
Post comments count0
Post likes count0

How Can I Tell Whether a Group is a Security Group or a Distribution Group?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Is there any way to tell whether an Active Directory group is a security group or a distribution group?-- AW Hey, AW. As a matter of fact, there is; this script will tell you what type of group you’re dealing with:Set objGroup = GetObject _ ("LDAP://cn=Finance Managers, ou=Finance, dc=Fabrikam, dc=com") Wscript.Echo objGr...

Scripting Guy!VBScriptActive Directory
Dec 14, 2004
Post comments count0
Post likes count0

How Can I Rename an Active Directory Group?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I rename an Active Directory group?-- CL Hey, CL. This is actually pretty easy; as you’ll see, it only takes two lines of code. It’s not a hard problem, it’s just a little bit tricky. That’s because ADSI (at least when it comes to dealing with Active Directory) does not have a Rename method. Instead, you need to use t...

Scripting Guy!VBScriptActive Directory
Dec 10, 2004
Post comments count0
Post likes count0

How Can I Map Drives Based on Membership in a Group?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! How can I map drives in a logon script based on a security group each user belong to?-- RO Hey, RO. Considering the fact that this question has been asked by approximately 3,755,392 of our readers - oops, there’s another one; make that 3,755,393 of our readers - we decided it might be a good idea for us to answer it. So here ...

Scripting Guy!VBScriptActive Directory
Nov 22, 2004
Post comments count0
Post likes count0

How Can I List the Members of a Group in Alphabetical Order?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! I have a script that returns the names of all the users in an Active Directory group. How can I sort those names in alphabetical order?-- JW Hey, JW. Ah, yes, sorting data: the bane of script writers everywhere. Unfortunately, VBScript doesn’t have a built-in sorting mechanism, and neither does ADSI. Consequently, most p...

Scripting Guy!VBScriptActive Directory