We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Need to Enable IIS in Windows 10 PC? Notebook! [Answered]RSS

1 reply

Last post Sep 28, 2020 05:54 AM by Jalpa Panchal

  • Need to Enable IIS in Windows 10 PC? Notebook!

    Sep 28, 2020 04:36 AM|Curran Khan|LINK

    My PC got corrupted and not working properly because of IIS server on my Windows PC. I successfully disabled IIS by using the powershell command 

    Get-WindowsOptionalFeature -online | ? featurename -like "IIS" | Disable-WindowsOptionalFeature -Online -Remove
    

    You can find the thread on the following link! https://forums.iis.net/post/2162562.aspx

    Now, I'm trying back to Enable IIS in Windows 10 PC. But I can't able to find the IIS server on my Windows PC. I think the above command removed completely! I'm stuck! Help me out here! 

    Sorry for my bad English! New to forum! 

    CK
  • Re: Need to Enable IIS in Windows 10 PC? Notebook!

    Sep 28, 2020 05:54 AM|Jalpa Panchal|LINK

    Hi,

    After removing the feature make sure you reboot the machine.

    To enable iis you could try the below command:

     Enable-WindowsOptionalFeature -Online -FeatureName "IIS-DefaultDocument" -All

    it will install the iis on your machine. after that by using this below command you can get the feature is installed in iis:

    Get-WindowsOptionalFeature -Online | Where-Object {$_.FeatureName -like "IIS*"} | Format-Table

    you enable the separate feature using this command:

    Enable-WindowsOptionalFeature -Online -FeatureName "IIS-HttpRedirect"

    Regards,

    Jalpa

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.