Scripting Blog

A place to learn about PowerShell and share stories of automation

How Can I Tell Which Scripts are Running on a Computer?

Hey, Scripting Guy! How can I tell which scripts are running on a computer?-- NW Hey, NW. This is a question we’re always a little reluctant to answer, because there’s a 50-50 chance you’ll be disappointed with what you hear. If you are running Windows 2000 (or a previous version of Windows), the answer is pretty straightforward: you ...

How Can I Manage Scheduled Tasks Using Scripts?

Hey, Scripting Guy! Is there an easy way to manage scheduled tasks using scripts?-- RC Hey, RC. You just had to ask that question, didn’t you? To be honest, this is not one of scripting’s strong points, and you might be more confused after hearing the answer than you were before asking the question. But here goes. The problem we have here...

How Can I Tell Which Account a Service is Running Under?

We have services that run under a particular user account. Each time we change the password for that user account, we need to change the password for any services that run under that account as well. But how can we tell which account a service is running under?-- SA Hey, SA. By and large WMI is a pretty transparent technology. To manage ...

How Can I Tell if a Server has Rebooted?

Hey, Scripting Guy! Is there any way to tell whether or not a server has rebooted?-- MvdM Hey, MvdM. We’re assuming that you’re performing a task and, at the end of the task, the computer is supposed to reboot. Needless to say, you want to know, “Well, did the server reboot?” How can you tell whether the machine restarted or not? The ...