Check IIS is installed via regkey or Get-WindowsFeature

by Huiting   Last Updated October 10, 2019 04:00 AM

I would like to check if my VM is installed with IIS. Which method is more accurate?

1. Registry Editor

Check for regfolder and regkey
HKLM\Software\Microsoft\Inetstp -> Folder must exist
HKLM\Software\Microsoft\Inetstp\VersionString -> Value must be valid


2. Get-WindowsFeature

PS > (Get-WindowsFeature Web-Server).InstallState -eq "Installed"

For Get-WindowsFeature, some VMs reply back with InstallState as "Available". Does it mean the same?



Related Questions


Updated December 29, 2016 08:00 AM

Updated July 26, 2018 05:00 AM

Updated February 18, 2019 01:00 AM

Updated August 25, 2017 21:00 PM