1

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?

0

The supported method is with Get-WindowsFeature, because the registry keys can change at any time.

"Available" means that the feature is available for installation but is not installed

Get-WindowsFeature
Gets information about Windows Server roles, role services, and features that are available for installation and installed on a specified server.

  • Consider the fact that installers of all official IIS OOB components check the registry key, I don't think that's "not supported". – Lex Li Oct 10 '19 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.