Skip to content

Instantly share code, notes, and snippets.

@manoj-choudhari-git
Created December 25, 2020 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-choudhari-git/780908efaba685283ff4b4962476197e to your computer and use it in GitHub Desktop.
Save manoj-choudhari-git/780908efaba685283ff4b4962476197e to your computer and use it in GitHub Desktop.
PowerShell script to install IIS
# install IIS server role
Install-WindowsFeature -name Web-Server -IncludeManagementTools
# remove default htm file
remove-item C:\inetpub\wwwroot\iisstart.htm
# Add a new htm file that displays server name
Add-Content -Path "C:\inetpub\wwwroot\iisstart.htm" -Value $("Hello World from " + $env:computername)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment