Scripting Blog [archived]

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

How Can I Determine the ADsPath for the Logged-On User?

(image) Hey, Scripting Guy! In my HTA, how can I determine the ADsPath for the logged-on user?-- AC(image) (image) (image) Hey, AC. You know, when you work at Microsoft people automatically assume that you spend your days in an ivory tower, totally removed from the day-to-day activities and needs of system administrators. To be honest, ...

How Can I Determine an Attribute’s Data Type and Whether It is Single- or Multi-Valued?

(image) Hey, Scripting Guy! How can I query the Active Directory schema for an attribute’s data type and whether it is single-valued or multi-valued?-- MS(image) (image) (image) Hey, MS. You know, this turned out to be one of those questions that drive us crazy: after all, it seemed like it would be so easy to answer. As you’ve ...

Hey, Scripting Guy! How Can I Configure the Hide From Exchange Address Lists Property for All the Contacts in a Domain?

(image) Hey, Scripting Guy! How can I configure the Hide From Exchange Address Lists property for all the contacts in a domain?-- MM(image) (image) (image) Hey, MM. You know what the say: you can run, but you can’t hide (especially from Microsoft Exchange!). But what they forgot to add is that you can hide, as long as you’ve set the ...

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

(image) 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(image) (image) (image) 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 ...

How Can I Determine Which Attributes are Replicated to the Global Catalog?

(image) Hey, Scripting Guy! How can I find out which attributes are replicated to the global catalog?-- AS(image) (image) (image) Hey, AS. When people envision the future, they often foresee enormous skyscrapers, buildings so large that you might live your whole life without ever leaving them: you’ll live there, work there, go to school ...