Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

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

(image) 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(image) (image) (image) Hey, JW. Well, this is definitely one of the more interesting questions we’ve received. As far as we ...

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

(image) Hey, Scripting Guy! Is there any way to tell whether an Active Directory group is a security group or a distribution group?-- AW(image) (image) (image) 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, ...

How Can I Rename an Active Directory Group?

(image) Hey, Scripting Guy! How can I rename an Active Directory group?-- CL(image) (image) (image) 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 ...