Below WMI script lists IIS directories. If you don't have any output, then the result is that MyMachine doesn't have IIS installed.
for each item in GetObject("winmgmts://MyMachine/root/MicrosoftIISv2").ExecQuery("SELECT * FROM IIsWebVirtualDir" )
WScript.Echo item.name
next