Skip to content

Instantly share code, notes, and snippets.

@shinish
Last active November 18, 2022 08:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shinish/5cee1d9006c71ef789441e170aaafac9 to your computer and use it in GitHub Desktop.
Save shinish/5cee1d9006c71ef789441e170aaafac9 to your computer and use it in GitHub Desktop.
Learn to Install IIS server using Windows PowerShell from scratch
# Title : Installing Windows Feature - IIS (WebServer) using PowerShell
# -By Shinish.S
$IsInstalled = ((Get-WindowsFeature -Name Web-Server).installed)
if ($isinstalled -eq $false){
Install-WindowsFeature Web-Server -IncludeManagementTools -IncludeAllSubFeature -Confirm:$false
Write-Output "Installation Complete"
}
else{
Write-output "IIS Server (WebServer) is already installed"
}
@nguyenlethaihoang
Copy link

I have an error: "'Get-WindowsFeature' is not recognized"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment