Scripting Blog [archived]

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

Why am I Getting an Error when Trying to Determine an IP Address?

(image) Hey, Scripting Guy! I’m trying to determine the IP address on a computer, but I keep getting a Type Mismatch error. Do you know why? -- AQ, Jacksonville, FL(image) (image) (image) Hey, AQ. As a matter of fact, we do know why you’re getting a Type Mismatch error, and it’s a common problem when working with the WMI class ...

Why Doesn't My Search Return All My User Accounts?

(image) Hey, Scripting Guy! I’m trying to pull a list of all my users out of Active Directory. I’m using ADO to search for these users, but no matter what I do I can only get 1,000 user names, even though we probably have 10 times that many user accounts. What could I be doing wrong?-- MC, Athens, GA(image) (image) (image) Hey, MC. Boy, ...

How Can I Determine Which Groups a User Belongs To?

(image) Hey, Scripting Guy! In my logon script, how can I find out which Active Directory groups a user belongs to? -- JB, Montpelier, VT(image) (image) (image) Hey, JB. This is pretty easy to do in a logon script: So what’s going on here? Well, we begin by using the ADSystemInfo object to determine the distinguished name of the logged-on ...

How Can I Determine if a Folder Exists on a Computer?

(image) Hey, Scripting Guy! Is there any way to determine whether or not a specific folder exists on a computer?-- RP, Umatilla, OR(image) (image) (image) Hey, RP. There are a couple ways of doing this, depending on whether you are looking for the folder on the local computer or on a remote computer, and depending on whether or not you know ...