Scripting Blog [archived]

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

How Can I Add a Domain Group to the Local Administrators Group?

(image) Hey, Scripting Guy! How can I add a domain group to the local Administrators group?-- SS(image) (image) (image) Hey, SS. You know, people think of the Scripting Guys as striding powerfully through the world of system administration scripting, confident, almost-arrogant in the knowledge that they can meet any challenge thrown at ...

How Can I List All the Groups in an OU?

(image) Hey, Scripting Guy! How can I list all the groups in an OU?-- MK(image) (image) (image) Hey, MK. You know, sometimes people ask us a question and then immediately apologize for having asked it, believing that the question is “way too easy for you guys.” In turn, that seems to imply that the Scripting Guys aren’t really guys ...

How Can I Enumerate All the Universal Groups in Active Directory?

(image) Hey, Scripting Guy! How can I enumerate all the universal groups in Active Directory?-- MW(image) (image) (image) Hey, MW. You know, we’re glad you asked this question. Any time people talk about Active Directory then tend to talk about groups as if Active Directory had only one type of group. It doesn’t. Instead, there are six...

How Can I Add All the Users from an Existing Active Directory Group to a New Group?

(image) Hey, Scripting Guy! How can I add all the users from an existing Active Directory group to a new group?-- TG(image) (image) (image) Hey, TG. So you have a group (we’ll call it Group A) and you want to create an exact replica of that group (we’ll call it Group B). If we were talking about Text File A and Text File B this would ...

How Can I Tell Whether a Group Member is a User, a Computer, or Another Group?

(image) Hey, Scripting Guy! How can I tell whether the member of a group is a user, a computer, or another group?-- ON(image) (image) (image) Hey, ON. Interesting question and - to tell you the truth - one we’d never really thought about. It’s easy enough to list all the members of a group; for example, here’s a script that reports ...