#!/usr/bin/perl -w use strict; use Win32::OLE qw(in); my $hostname = shift; my $service = Win32::OLE->GetObject("IIS://$hostname/W3SVC"); for my $server (in $service) { if ($server->{Class} eq "IIsWebServer") { print $server->{ADsPath} . ': ' . $server->{ServerComment} . "\n"; } }