Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Determine if the Local Administrator Account has been Renamed on a Computer?

Hey, Scripting Guy! How can I determine if the local administrator account has been renamed on a computer?-- KF Hey, KF. You know, our first thought was to tell you to use ADSI and try to bind to the local administrator account on the computer; if that failed, that would mean that there was no account named Administrator on that computer. ...

How Can I Determine the Current Screen Resolution Being Used on a Computer?

Hey, Scripting Guy! How can I determine the current screen resolution being used on a computer? You know, things like 1600x1200 resolution, 16-bit color, that kind of information.-- FE Hey, FE. Remember when you were a kid and your mom would have that annoying habit of beginning a discussion by answering the question you didn’t ask? For ...

How Can I Determine the Date and Time that a Process Started?

Hey, Scripting Guy! How can I determine the date and time that a process started?-- BM Hey, BM. We’ve got good news for you: not only do we have an answer to your question, but we’re not going to bore everyone with any more stories regarding our Colt League All-Star team. Nope, we’re no longer haunted by the fact that, in a tie game, ...

How Can I Retrieve Information About the Printer Driver Used by a Printer?

Hey, Scripting Guy! How can I retrieve information about the printer driver used by a specific printer?-- RW Hey, RW. Did you say something? Oh, right: printer drivers. You’ll have to excuse us today: the Scripting Guys (well, one of them anyway) are in mourning. That’s because the Colt League All-Star team he helped coached finished ...

How Can I Determine When an Active Directory User Account will Expire?

Hey, Scripting Guy! How can I determine when an Active Directory user account will expire?-- JK Hey, JK. By the way, please accept our apologies for hiding under the desk and pretending we weren’t in when your question arrived; we always get a little nervous any time we get questions involving dates and Active Directory. That’s because ...