Installing IIS
Before you can use IIS, you must install it onto your host. Like other roles and features of Windows Server 2019 that are covered in this book, you install IIS by using the Install-WindowsFeature
cmdlet. Once you have installed the web server, you can take a look at the host.
Getting ready
This recipe uses SRV1
and assumes a fresh installation. If you have used SRV1
to test previous recipes, you may need to remove the Web-Server
feature before you run this recipe. Also, you should have the Windows Server 2019 installation DVD in the D:
drive of SRV1
.
How to do it…
- Add the
Web-Server
feature, sub-features, and tools toSRV1
, as follows:$FHT = @{ Name = 'Web-Server' IncludeAllSubFeature = $true IncludeManagementTools = $true Source = "D:\sources\sxs" } Install-WindowsFeature @FHT
- See what features are installed:
Get-WindowsFeature -Name Web* | Where-Object Installed
- Check the IIS administration modules:
$Modules...