#! perl -w use strict; use Win32::OLE; Win32::OLE->Option(Warn => 3); my $hostname = shift; my $rootkey = shift; my $Collection = Win32::OLE->GetObject("IIS://$hostname/w3svc"); foreach my $website (@$Collection) { print $website->{ServerComment}, $/; }