title: Could not install windows feature IIS
body: <p>I tried to reinstall iis on my windows 10 system through Control Panel\Programs and Features\ Turn Windows features on or off but after uninstalling it there is a problem with installing iis again.</p>
  
  <p>Here are screenshots with all errors I'm facing at the moment:
  <a href="https://i.stack.imgur.com/F0qXh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F0qXh.png" alt="windows feature install message"></a></p>
  
  <p><a href="https://i.stack.imgur.com/anNVS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/anNVS.png" alt="IIS main screen"></a></p>
  
  <p><a href="https://i.stack.imgur.com/FvxX6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FvxX6.png" alt="IIS error message when trying to open Sites tab"></a></p>
  
  <p><a href="https://i.stack.imgur.com/KbWDT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KbWDT.png" alt="IIS error message when trying to open Application Pools tab"></a></p>
  
  <p>In folder Windows/System32/inetsrv/config I recreated file named ApplicationHost.config</p>
  
  <p>here is the configuration:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;configuration&gt;
      &lt;system.applicationHost&gt;
          &lt;applicationPools&gt;
              &lt;add name="DefaultAppPool" /&gt;
              &lt;applicationPoolDefaults&gt;
                  &lt;processModel identityType="NetworkService" /&gt;
              &lt;/applicationPoolDefaults&gt;
          &lt;/applicationPools&gt;
          &lt;customMetadata /&gt;
      &lt;listenerAdapters&gt;
          &lt;add name="http" /&gt;
      &lt;/listenerAdapters&gt;
      &lt;log&gt;
          &lt;centralBinaryLogFile enabled="true" directory="%SystemDrive%\inetpub\logs\LogFiles" /&gt;
          &lt;centralW3CLogFile enabled="true" directory="%SystemDrive%\inetpub\logs\LogFiles" /&gt;
      &lt;/log&gt;
      &lt;sites&gt;
          &lt;site name="Default Web Site" id="1"&gt;
              &lt;application path="/"&gt;
                  &lt;virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" /&gt;
              &lt;/application&gt;
              &lt;bindings&gt;
                  &lt;binding protocol="http" bindingInformation="*:80:" /&gt;
              &lt;/bindings&gt;
          &lt;/site&gt;
          &lt;siteDefaults&gt;
              &lt;logFile logFormat="W3C" directory="%SystemDrive%\inetpub\logs\LogFiles" /&gt;
              &lt;traceFailedRequestsLogging directory="%SystemDrive%\inetpub\logs\FailedReqLogFiles" /&gt;
          &lt;/siteDefaults&gt;
          &lt;applicationDefaults applicationPool="DefaultAppPool" /&gt;
          &lt;virtualDirectoryDefaults allowSubDirConfig="true" /&gt;
      &lt;/sites&gt;
      &lt;webLimits /&gt;
  &lt;/system.applicationHost&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Does anyone had something like that before me and was able to run IIS again without reinstalling entire system from scratch?</p>
  
  <p>If any information needed please do not hasitate to ask in comment section.</p>
  
  <p>Thanks in advance :)</p>