Scripting Blog [archived]

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

How Can I Change a User’s Primary Group?

(image) Hey, Scripting Guy! How can I change a user’s primary group?-- AS(image) (image) (image) Hey, AS. You know, one of the Scripting Guys knows how to make an incredibly rich rocky road brownie, a brownie that’s topped with melted marshmallows and walnuts and chunks of dark chocolate and all sorts of other good stuff. Now, some ...

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

How Can I Determine the 20 Largest Files on a Computer?

(image) Hey, Scripting Guy! How can I determine the 20 largest files on a computer?-- PW(image) (image) (image) Hey, PW. Having recently returned from a vacation in Europe, the Scripting Guy who writes this column now understands that there are different ways to do things. Some of these would be difficult to adjust to on a regular basis: ...