Scripting Blog [archived]

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

How Can I Put New Users in the Same OU as the Person Creating Their Accounts?

(image) Hey, Scripting Guy! We use a script to create user accounts. How can I modify this script so that it will place the new user in the same OU as the person running the script?-- CB(image) (image) (image) Hey, CB. Interesting question. We’re assuming that you’ve delegated control of Active Directory. User A, for example, has the ...

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