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 = ...
Get Windows Server 2019 Automation with PowerShell Cookbook - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.