Scripting Blog [archived]

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

How Can I Determine When a User Last Changed His or Her Password?

(image) Hey, Scripting Guy! How can I determine when a user last changed his or her password?-- MG(image) (image) (image) Hey, MG. A long time ago one of the Scripting Guys worked at a local university. In one of the departments there it was easy to determine when a user last changed his or her password: that’s because the administrative...

Hey, Scripting Guy! How Can I Retrieve the Value of an Active Directory Attribute that has a Hyphen in Its Name?

(image) Hey, Scripting Guy! We have a custom application that adds some attributes to the Active Directory schema. These attributes have hyphens in their names, and I can’t figure out how to retrieve the value of those attributes; any time I try to connect to one I get an error message. Any suggestions?-- TW (image) (image) Hey, TW. ...

How Can I Determine Which Domain Controller Authenticated a User?

(image) Hey, Scripting Guy! In my logon script how can I determine the name of the domain controller that authenticated the user?-- CK(image) (image) (image) Hey, CK. You know, one of the unwritten rules for being a Scripting Guy is that you should never do anything hard more than once a week. (Why is this an unwritten rule? Mainly because...

How Can I Get a List of All the Disabled User Accounts in Active Directory?

(image) Hey, Scripting Guy! How can I get a list of all the disabled user accounts in Active Directory?-- RT(image) (image) (image) Hey, RT. Now, just remember, you asked for this. We have a script that returns a list of disabled user accounts in Active Directory; the only problem is that part of the script is a little cryptic (to say the ...

How Can I Add an Email Address to the proxyAddresses Attribute?

(image) Hey, Scripting Guy! How can I add an email address to the proxyAddresses attribute without overwriting all the existing attributes?-- DH(image) (image) (image) Hey, DH. For those of you who aren’t too familiar with the proxyAddresses attribute (and, alas, that includes the Scripting Guys) proxyAddresses is an attribute added to ...