nate

Necessity is the mother of invention as they say. Today I had to write a couple of scripts to translate DNS names into IP addresses and vice versa. Since there is no easy way to do this in VBScript, I whipped up two (well three) quick little functions that use the nslookup command to preform … Read more

A couple of months ago I posted an entry about zipping and unzipping files with 7zip and VBScript. The script works well and I use it quite frequently and I definitely recommend it over WinZip if you have a choice. I ran into a situation for a client where they needed a scripting solution but … Read more

I haven’t written in quite some time, but I thought I’d take some time this morning to share a little tidbit of information that I found quite handy. Every once in a while I’ll dock my laptop or log into a machine that had been in use via remote desktop and a window will be … Read more

Frequently I have had the need to log certain information or messages to a log file as script is running. Since this is such a frequent requirement, and adding logging to a script can be a messy affair since it’s often an after thought. I decided to write a sub routine that you could easily … Read more

This set of functions will start and stop services on the local machine or remote machines. These functions utilize the “SC” executable which should be in your local computer’s path variable. If you want to use these functions to query or manipulate the local computer’s services just pass a period (.) as the computer name … Read more

On more than one occasion I have wanted to pull a HTML text field from a database to populate a portion of a webpage. This is pretty common practice and really handy because you can update pages with forms. This works really well except when you only want to pull just a portion of HTML … Read more

Occasionally it is really handy to zip and unzip files before you copy them around, or you want to archive them automatically for storage. I often use 7Zip for this task because it’s free and open source, has a great compression ratio, and supports a ton of formats. Since 7Zip is such a handy tool … Read more

A couple of weeks ago I wrote a script called BSODCheck.vbs. This script will remotely check to see if a machine has created a new memory.dmp file. The existence of a new file indicates that a machine has blue screened and crashed. This script is intended to be run periodically and the results of the … Read more

There are quite a few times when I’ll reboot a server pragmatically and want to know if the reboot was successful, or if the machine has finished rebooting before I continue to run commands against it. I wasn’t sure of a good way to do that other than looking at the machine’s uptime and making … Read more

This is a little function I like to call “ReadableBytes”. It is so named because I’d often call properties of an object and their values would be returned in bytes. Well this would be fine and dandy but it got hard to tell how big a particular file, folder, or drive was at a glance … Read more