I have been searching for a script that will return all of installed windows
components such as IIS, WWW, SMTP, etc...Then I want to be able to for
example if IIS is installed, enumerate the websites and dump the
configuration into a file similar to rick-click export in the mmc console.
Any help would be appreciated.

Thanks,

Aaron

Re: enumerate windows components by heintz

heintz
Tue Jan 29 15:34:33 CST 2008

On Jan 29, 8:17=A0am, "AaronK" <aar...@fake-email.com> wrote:
> I have been searching for a script that will return all of installed windo=
ws
> components such as IIS, WWW, SMTP, etc...Then I want to be able to for
> example if IIS is installed, enumerate the websites and dump the
> configuration into a file similar to rick-click export in the mmc console.=

> Any help would be appreciated.
>
> Thanks,
>
> Aaron

You can run this on the machine you are trying to pull the IIS
Components from...

Dim objIIS,strIISCom,strComputer
strIISCom =3D Array("W3SVC","MSFTPSVC","SMTPSVC","NNTPSVC")
strComputer =3D "localhost"

for i =3D 0 to ubound(strIISCom)
Set objIIS =3D GetObject("IIS://" & strComputer & "/" & strIISCom(i))
if err.number <> 0 then
wscript.echo strIISCom(i) & " is NOT installed"
err.Clear()
else
wscript.echo strIISCom(i) & " is installed"
end if
Set objIIS =3D Nothing
next

As for the 2nd part of the script you need hopefully someone else will
chime in...

Re: enumerate windows components by heintz

heintz
Tue Jan 29 15:36:00 CST 2008

On Jan 29, 3:34=A0pm, "heintz.la...@gmail.com" <heintz.la...@gmail.com>
wrote:
> On Jan 29, 8:17=A0am, "AaronK" <aar...@fake-email.com> wrote:
>
> > I have been searching for a script that will return all of installed win=
dows
> > components such as IIS, WWW, SMTP, etc...Then I want to be able to for
> > example if IIS is installed, enumerate the websites and dump the
> > configuration into a file similar to rick-click export in the mmc consol=
e.
> > Any help would be appreciated.
>
> > Thanks,
>
> > Aaron
>
> You can run this on the machine you are trying to pull the IIS
> Components from...
>
> Dim objIIS,strIISCom,strComputer
> strIISCom =3D Array("W3SVC","MSFTPSVC","SMTPSVC","NNTPSVC")
> strComputer =3D "localhost"
>
> for i =3D 0 to ubound(strIISCom)
> =A0 =A0 =A0 =A0 Set objIIS =3D GetObject("IIS://" & strComputer & "/" & st=
rIISCom(i))
> =A0 =A0 =A0 =A0 if err.number <> 0 then
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 wscript.echo strIISCom(i) & " is NOT insta=
lled"
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 err.Clear()
> =A0 =A0 =A0 =A0 else
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 wscript.echo strIISCom(i) & " is installed=
"
> =A0 =A0 =A0 =A0 end if
> =A0 =A0 =A0 =A0 Set objIIS =3D Nothing
> next
>
> As for the 2nd part of the script you need hopefully someone else will
> chime in...

forgot to add...add this to the 1st line of the script...

On Error Resume Next