Scripting Blog [archived]

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

How Can I Increment the Last Line in a Text File?

(image) Hey, Scripting Guy! How can I increment the last line in a text file; that is, if the last line is 1, indicating weโ€™ve done one backup, I need to increment it to 2, indicating that weโ€™ve now done a second backup.-- TH(image) (image) (image) Hey, TH. If youโ€™ve ever been to a carnival then youโ€™ve no doubt been tempted by some...

How Can I Get a List of All the Users Whose Passwords Never Expire?

(image) Hey, Scripting Guy! How can I get a list of all the users whose passwords never expire?-- NW(image) (image) (image) Hey, NW. As you probably know, Internet gambling is illegal in the USA. Thatโ€™s too bad, because if it wasnโ€™t weโ€™d be willing to bet $10 that the answer to your question will be this: search Active Directory. And...