Showing archive results for 2004

Sep 3, 2004
Post comments count0
Post likes count0

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

ScriptingGuy1

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 in this column, but the basic idea is that you can ask WMI...

Scripting Guy!scripting techniquesVBScript
Sep 2, 2004
Post comments count0
Post likes count0

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

ScriptingGuy1

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 you automatically get back a collection of all th...

Scripting Guy!VBScriptActive Directory
Aug 31, 2004
Post comments count0
Post likes count0

How Can I Prompt a User for Input?

Doctor Scripto

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 will be presented with a graphical dialog box similar to this: Displ...

Scripting Guy!Windows PowerShellguest blogger
Aug 30, 2004
Post comments count0
Post likes count0

How Can I Stop a Script Partway Through?

Doctor Scripto

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 Alto, CA Hey, WK. This is one of the easiest ...

Aug 27, 2004
Post comments count0
Post likes count0

How Can I Determine the Day of the Week?

Doctor Scripto

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 might sound; that’s because VBScript has a built...

Scripting Guy!Windows PowerShellguest blogger