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…

2

How Can I Read in IP Addresses and Use Them in a Script?

Hey, Scripting Guy! I have a text file that contains a bunch of IP addresses. I’d like to be able to read these addresses from a script, and then use them to connect to those computers. Is that possible?– RL Hey, RL. You bet you can do this, and here’s how. First, make sure your…

0

How Can I Determine the Version Number of an Executable File?

Hey, Scripting Guy! How can I determine the version number of an executable file?– TW Hey, TW. Well, that depends. If the file is located on the local computer, the easiest way is to use the FileSystemObject. Have a burning desire to know which version of Regedit.exe is installed on your computer? All it takes…

1

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…

4

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

Hey, Scripting Guy! How can I be notified any time a service goes down?– RN 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…

0

How Can I Enumerate All the Objects in an Active Directory OU?

Hey, Scripting Guy! How can I enumerate all the objects in an Active Directory OU?– RB Hey, RB. By the way, thanks: it’s always nice to get an easy question every once in awhile! Enumerating all the objects in an OU is almost embarrassingly-simple: by default, any time you bind to an OU using ADSI…

6

How Can I Create a Folder on a Remote Computer?

Hey, Scripting Guy! Can I create a folder on a remote computer using a script?– AN Hey, AN. Life is full of mysteries. To name one, what possessed somebody to think that the world was clamoring for Clamato juice, an unholy concoction combining tomato juice and clam juice? (As long as we’re on the subject:…

7

How Can I Prompt a User for Input?

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 Hey, BN. The simplest – and most foolproof – way to do this is to use an InputBox; when you do that users…

6

How Can I Stop a Script Partway Through?

Hey, Scripting Guy! Is there a way to make a script stop itself if certain conditions aren’t met? Like say I’m going to copy files to a remote computer, but then the remote computer isn’t available. Can I write code that tells the script to just go ahead and quit at that point?– WK, Palo…

0

How Can I Determine the Day of the Week?

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 Hey, CT. This is actually much easier then it…

6