Created
December 25, 2020 16:31
-
-
Save manoj-choudhari-git/780908efaba685283ff4b4962476197e to your computer and use it in GitHub Desktop.
PowerShell script to install IIS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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