Scripting Blog [archived]

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

How Can I Get a List of Exchange Servers Assigned to My Users?

(image) Hey, Scripting Guy! How do I get a list of the Exchange servers (msExchHomeServerName) assigned to the users in an OU?-- BG(image) (image) (image) Hey, BG. As you probably already figured out, you have two issues: you need to get a list of all the users in an OU, and then you need to figure out which Exchange server they’ve been ...

How Do I Bind to a User Account in a Sub-OU?

(image) Hey, Scripting Guy! How do I bind to a user account when the user is in a sub-OU? Code like this doesn’t work: LDAP://CN=Ken Meyer, OU=NA\Human Resources, DC=fabrikam, dc=com.-- RD(image) (image) (image) Hey, RD. The past few days we’ve done some lengthy answers to questions, so we decided to be a little lazy today (hey, it is ...

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, ...