The VBScript Network and Systems Administrator's Cafe:

web tools

May 26 2009   2:49PM GMT

How to Add the Ability to Administer an IIS 6 Server From a XP Machine.



Posted by: Jerry Lees
IIS6, System Administration, iis, iis 6, web tools, webmaster, Microsoft Windows

In re-doing my laptop after a hard drive failure recently I’ve had to setup a bunch of stuff I had previously installed, one thing that several people have asked about (or didn’t know about) is the IIS6 MMC snap in. It allows you to Administer IIS6 from your desktop. It will give you the Internet Information Services (IIS6) Manager icon in Administrative tools and allow you to create custom MMC snap-ins for the web servers. It’s a huge time saver and allows you to do everything in IIS from your local machine (except administer SSL keys, so far as I can recall) that you can do while logged into the server—without logging onto the server!

First you’ll need IIS installed on your machine, via add/remove windows components in the add/remove programs control panel applet. After that run IIS 6 Mgr setup.exe from Microsoft’s Site here.

Feb 26 2009   8:00AM GMT

Retrieving the account IIS is using as the anonymous user account with VBScript



Posted by: Jerry Lees
iis, System Administration, Systems Administration, systems management, VBScript Functions, VBScript, web sites, web tools, working with objects

I recently posted a script that retrieved the anonymous user password for a server in IIS. This script I posted, Using the IIS ADSI object to retrieve the anonymous user password for a server via VBScript, came in quite handy in a pinch, but not knowing the anonymous user account the password goes with can also be a pain.Luckily I had that piece of information in the script as well!

So, I’ve wrapped that part of the script into a function for your use as well. Below is a snippet from the script to display the user account.

Function Get_IUSR_Username(ServerName)
Dim IIsObject

Set IIsObject = GetObject (”IIS://” & ServerName & “/w3svc”)
on Error resume Next
Get_IUSR_Username = IIsObject.Get(”AnonymousUserName”)
On Error GoTo 0
End Function

Enjoy!


Dec 23 2008   3:12AM GMT

A useful site that contains a Microsoft SQL version information database



Posted by: Jerry Lees
SQL Server, Server Patching, Essential sites, web tools, Microsoft SQL Server

I don’t get the occasion to manage SQL servers in a DBA role any longer, like MrDenny in his blog, nor have I been a true assigned DBA– I’ve only worked at places where the database servers were treated like any other server. Basically, mine to manage. Those of you in small to medium enterprises know what I’m talking about… If it plugs into the network it’s a Network/Server admin’s responsibility.

Now my role is more along the lines of Supporting the web applications that use the services that the database servers provide. Leaving the DBA role up to the folks assigned the title of DBA. Oh, how I used to think that would be so much easier! But that was when I imagined a team of folks who thought and worked like I did… Instead on occasion you get the folks on the other team who don’t believe a problem exists.

Well, I’ve recently found a site that really comes in handy in determining if SQL patches have been applied or if they may be relevant to an article you are reading that looks promising over at SQLSecurity.com that  is a database of SQL Server patches that helps you determine if a patch is relevant to your installation or not.

Hopefully, this will help you out in your challenges!


Dec 15 2008   5:41PM GMT

Essential tools: A useful tool to remove dead favorites links from your bookmarks



Posted by: Jerry Lees
essential tools, bookmark, bookmark management, tools, am-tools, web tools

As a quick addition to my additional tools series I wanted to share with you a great utility I found in the past few weeks that helps to manage old bookmarks.

If you’re like me, you have tons of bookmarks in your book marks and it’s There’s nothing worse than trying to weed through them to find that the item you have bookmarked is no longer there where you bookmarked it! I found a great tool called AM-Deadlink that is freeware!!! (Yes, it fits into the requirement I have for an essential tool that the tool be either cheap or free!) Seems like a handy tool to me, since I just spent hours going through bookmarks to delete old, no longer available bookmarks, in all my book marks!

Directly from the website it says “AM-DeadLink detects dead links and duplicates in browser bookmarks and text files. If a bookmark has become unavailable you can verify and delete it permanently.”

Check it out here!


Nov 3 2008   4:18PM GMT

HTTP Status Codes explained for web servers



Posted by: Jerry Lees
HTTP, web tools, web sites, Web applications, webmaster, http tools, Web Pages, HTTP Status Codes

As a web administrator I encounter quite a few instances where a weird HTTP status is returned to a browser.Even using them often it’s hard to remember the codes 100% and what they all mean. Sure, a 404 means the file doesn’t exist and a 200 is a good response… but what about the harder more obscure ones? Generally the toughest to resolve revolve around permissions and the HTTP 401.x status, here is a good article explaining the HTTP 401 sub status codes for IIS (The general idea will flow over to other web servers like apache as well).

As a  added bonus here is a great article that explains a vast variety of other HTTP Status codes.


Oct 31 2008   6:17AM GMT

Using Internet Explorer objects to scrape links from web pages.



Posted by: Jerry Lees
web tools, web sites, wget, Web Pages, InternetExplorer.Application

 Recently, I needed to write a tool that would scrape the links from a page. To accomplish this I used the Internet Explorer object “InternetExplorer.Application“.  We’ll explain it a bit more in a later entry but for now, take a look at the code below:

URL = “http://itknowledgeexchange.techtarget.com/itblogs/

With CreateObject(”InternetExplorer.Application”)
  .Navigate URL
  Do Until .ReadyState = 4
    Wscript.sleep 10
  Loop
  for each link in .document.links
    Wscript.echo link, link.InnerText
  next

‘ Uncomment the three lines below to scrape references to images
‘  for each pix in .document.images
‘  Wscript.echo pix.src
‘  Next
 
  .Quit
End With


Oct 16 2008   2:53AM GMT

Consuming and using a web service from within VBScript to create a WHOIS tool



Posted by: Jerry Lees
VBScript, SOAP, WSDL, web tools, web sites, Web Service, Web Pages

Recently I posted a list of web services at a site that were public web services, in the article entitled A Great list of FREE publicly available Web Services. In looking through them I noticed one that would be useful- a WHOIS web service!

Please keep in mind that this script uses a PUBLIC and FREE web service to preform the heart of it’s work… it might not be always available and that is out of both our control. However, the code will work, with minor changes where noted for any other web service.

First some background on a web service. When you consume (use) a web service, you call it like you would any other class or function, with a .functionname after the object is created as an instance.

The MSSOAP.SOAPClient line below creates a SOAP object, and the .MSSOAPINIT creates an instance of your web service in that object. Then, in this case the .whois  call actually makes it preform the functions on the remote system. The remote system then returns back the value from the function to you just as if a local function were called.

Pretty cool stuff! So, here is the code to call a web service from VBScript!
dim SOAPClient, Response
‘create the SOAP object
Set SOAPClient = createobject(”MSSOAP.SOAPClient”)
on error resume Next
‘create a instance of the WHIOIS web service
SOAPClient.mssoapinit(”
http://www.ecubicle.net/whois_service.asmx?WSDL“)
  ‘ check for errors… deal with them if they occur by reporting them
  if err Then
    wscript.echo SOAPClient.faultString
    wscript.echo SOAPClient.detail
  end If

‘this next line is where we actually CALL the web service
Response = SOAPClient.Whois(”whois.networksolutions.com”, 43, “networksolutions.com”)

‘fix up network solutions’ HTML responses to whois queries. why do they have to be difficult?
Response = replace(Response,”<br/>”,VbCrLf)
Response = replace(Response,”<BR/>”,VbCrLf)

‘ echo the response recieved (since it’s a string)
wscript.echo Response

‘ check for errors… deal with them if they occur by reporting them
  if err Then
    wscript.echo SOAPClient.faultString
    wscript.echo SOAPClient.detail
  End If


Oct 10 2008   7:57PM GMT

A Great list of FREE publicly available Web Services



Posted by: Jerry Lees
SOAP, WSDL, web tools, web sites, Web Service, webmaster, Web Pages

As an IIS Administrator I have spent quite a bit of time administering web sites and web services in my role where I work. Recently, I have been doing some work with Web Services in IIS to actually monitor them since we needed to do more than just simply monitor the Web Service Definition Language (WSDL) page.

For those of you who do this sort of work, you know this is a real challenge sometimes, since the web service can actually be broken– but the WSDL page shows up. So, I had to create something to actually consume the web service so that we could truely test the web service.

Web Services are basically (yes, I’m boiling it down to the bare minimum here…) web sites that accept input via the HTTP protocol, preform work based on those parameters, and return back some value via HTTP. Just like a FUNCTION! This is an exciting technology, becasue it essentially is distributed computing.

This caused me to look for public web services, again, because I was interested in the concept since I first heard about it 4 or 5 years back. I found a decent site that had a list of web services that were available on the internet at Xmethods.net. While they all aren’t free (and they all didn’t appear to be operational) — it did seem like a decent list of sometimes useful stuff to have handy.

Having found this, I can now share the consumption of web services from VBScript with you in another blog posting– Consuming and using a web service from within VBScript to create a WHOIS tool.


Aug 13 2008   2:29PM GMT

Essential tools: Wget, a command line tool to retrieve web pages



Posted by: Jerry Lees
web tools, free tools, Systems administrator tools, Toolkit, essential tools, wget, http tools, windows tools

There is nothing more annoying than having a web server or site down and IE (or FireFox, for that matter) become dog slow or simply getting in the way of trouble shooting the page. Additionally, sometimes these browsers actually get in the way of troubleshooting the problem by masking the error page the server sends back– IE’s “friendly” HTTP errors messages, for example. When it comes right down to fixing the problem, sometimes you need to retrieve just the HTML code a particular web page sends simply for inspection or analysis. That is where our next essential tool comes in!

Wget is a small (~325K) command line utility that allows you to download a HTTP, HTTPS, or FTP file quickly from the command line and save it locally so you can open it with a text editor, simply have it in an alternate location, or use in a comparison to what a specific browser renders after download. Wget for windows can be downloaded here. It’s a powerful tool, and covering all the options in one posting isn’t possible, so let’s start off with a little syntax to get you rolling:

In its  simplest form you can download a specific page, including a full URL, as shown below:

wget http://www.gamersigs.net

Alternatively, you can download a site and all its linked items recursively to a specific number of levels. This is useful to archive a site or  to simply grab pages that the HTML uses, but doesn’t link to directly– Cascading Style Sheets (css) for example. The syntax below will recursively get 2 levels of www.msn.com and automatically create a directory called www.msn.com in the current directory.

wget -r –level=2 http://www.msn.com

If the page links to a HTTPS page, wget will automatically try to negotiate a SSL connection. You can optionally specify the SSL protocol to use by adding –secure-protocol=PR, where PR is either auto, SSLv2, SSLv3, or TLSv1. This is especially helpful in testing and ensuring your servers do not respond to the weaker SSLv2 SSL protocol.

If you deal with websites as a part of your Systems Administration duties– or if you’re just interested in it as a side project at the office, I’m sure you’ll add this tool to your essential tools.

Know of a tool that you think is essential? Post a comment here and if I don’t already have it in my tool belt, I’ll add it and give it a shot. If it makes the grade– I’ll add it to the list of tools to review. The only criteria are:

  1. The tool must be free, or inexpensive with a “Per User” or “site” type license. (No pay per installation licenses, please)
  2. The tool (or it’s installation file) must be small enough to fit on a 256Mb flash drive for portability.
  3. Command line run time options are beneficial, but not required.
  4. If it has ads… it needs be truly INVALUABLE.
  5. It should make the user’s job easier by gathering information or preforming a task that a typical Network or Systems Administrator would preform.

Enjoy!