Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

Is there a way to detect whether IIS is installed or not using WMI query, in a remote machine.

Thanks
Posted
Updated 8-Mar-12 17:45pm
v2

1 solution

Below WMI script lists IIS directories. If you don't have any output, then the result is that MyMachine doesn't have IIS installed.

SQL
for each item in GetObject("winmgmts://MyMachine/root/MicrosoftIISv2").ExecQuery("SELECT * FROM IIsWebVirtualDir" )
  WScript.Echo item.name
next
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900