Scripting Blog [archived]

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

How Can I Tell if a Server has Rebooted?

(image) Hey, Scripting Guy! Is there any way to tell whether or not a server has rebooted?-- MvdM(image) (image) (image) 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 ...

How Can I Be Notified Any Time a Service Goes Down?

(image) Hey, Scripting Guy! How can I be notified any time a service goes down?-- RN(image) (image) (image) Hey, RN. As usual, there are a couple different ways you can do this, but perhaps the simplest approach is to create a script that monitors WMI events. We don’t have time to do a detailed explanation of WMI events in this column, but...

How Can I Prompt a User for Input?

(image) Hey, Scripting Guy! I need my script to prompt users to enter some information, like the name of the file they want to create. How do I do that?-- RW, Williamsport, PA(image) (image) (image) Hey, BN. The simplest - and most foolproof - way to do this is to use an InputBox; when you do that users will be presented with a graphical...

How Can I Determine the Day of the Week?

(image) Hey, Scripting Guy! I have a script that does certain management tasks based on the day of the week. I know how get the date in a script, but how can I tell whether it’s a Monday or a Tuesday or whatever? -- CT, Tallahassee, FL (image) (image) (image) Hey, CT. This is actually much easier then it might ...