Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Use a Script to Rename a Printer?

Hey, Scripting Guy! How can I use a script to rename a printer?-- SB Hey, SB. Well, if your printer is connected to a Windows 2000 or Windows NT 4.0 print server we have bad news for you: you can’t rename a printer using a script, at least not using the technologies included in the operating system. (There might, or might not, be third-...

How Can I Get a List of the ODBC Drivers that are Installed on a Computer?

Hey, Scripting Guy! How can I get a list of the ODBC drivers that are installed on a computer?-- VV Hey, VV. This is one of those questions that end up driving us crazy. That’s because it: a) seems so simple and, b) appears as though there are a number of ways to get this information. For example, on our Windows XP computer we have no ...

How Can I Cause a User’s Password to Expire?

Hey, Scripting Guy! How can I cause a user’s password to expire?-- GB Hey, GB. You know, one thing people dislike about politicians is that any time you ask them a question many politicians will give you an answer to a different question. Even worse, if you press them on that point they’ll tell you that there’s a good reason why they ...

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

Hey, Scripting Guy! How can I determine when a user last changed his or her password?-- MG 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 assistant kept a list of all ...

How Can I Launch Two Applications, Wait Until One Program Ends, and Then Close the Other?

Hey, Scripting Guy! Here’s what I’d like to do: I want a script that will launch two executable files. After the first application closes I’d like the script to close the second application and then quit. How can I do that?-- MK Hey, MK. You know, this is the kind of question we like. Why? Because it sounds really ...