Scripting Blog [archived]

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

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 Verify that None of My Local User Accounts have a Blank Password?

(image) Hey, Scripting Guy! How can I verify that none of my local user accounts have a blank password?-- TB(image) (image) (image) Hey, TB. To begin with, we should point out that at least some of you won’t need to make this check on computers within your domain; that’s because you’re using password policies in the domain that would...

How Can I Set Word’s Default File Location to be the User’s Home Directory?

(image) Hey, Scripting Guy! How can I set Word’s default file location to be the user’s home directory?-- LD(image) (image) (image) Hey, LD. Ah, memories. There was a period of time when it seemed like every question we answered in this column was a two-part question: we’d always find ourselves doing things like showing people how to...