Scripting Blog [archived]

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

Hey, Scripting Guy! How Can I Use Windows PowerShell to Determine Whether a Local User Account Exists?

(image) Hey, Scripting Guy! How can I use Windows PowerShell to determine if a specified local user account exists on a computer?-- MM(image) (image) (image) Hey, MM. Have you ever heard the expression “good things come to those who wait”? Well, to tell you the truth, the Scripting Guys have never put much credence in that old saying; ...

How Can I Remove a Specific Set of Users From the Local Administrators Group?

(image) Hey, Scripting Guy! How can I delete all the users whose name starts with GER/ad_ from the local Administrators group on a computer?-- ID (image) (image) (image) Hey, ID. It’s a Friday as the Scripting Guy who writes this column writes this column. Usually Fridays are a very sad day for this Scripting Guy: after all, when Friday ...

How Can I Get a List of All the Local Users Who Have an Expiring Password?

(image) Hey, Scripting Guy! How can I get a list of all the local users who have an expiring password?-- JM(image) (image) (image) Hey, JM. Thanks for the question. Before we answer it, however, we have a question for you: you don’t by any chance have any spare dice lying around, do you? That’s right, dice, the kind you use when ...

How Can I Configure an Expiration Date for a Local User Account?

(image) Hey, Scripting Guy! How can I configure an expiration date for a local user account?-- GW(image) (image) (image) Hey, GW. You know, it’s amazing how quickly things change in the fast-paced world of system administration scripting. For example, in Monday’s column we announced that, as time allowed and whenever possible, the ...

How Can I Get the Full Name of a Windows NT 4.0 User When All I Have is Their Logon Name?

(image) Hey, Scripting Guy! How can I determine the full name of a user in a Windows NT 4.0 domain when all I have is the user’s logon name?-- NH(image) (image) (image) Hey, NH. In case you’re wondering, after a less-than-auspicious beginning the Scripting Guy who writes this column started to get used to swimming laps every night; in ...