To add the Web Server (IIS) role to WEB2 via PowerShell, follow these steps:
- Log in to WEB2 and open a PowerShell prompt; make sure to run it as administrator.
- All we have to do is run the proper cmdlet specifying the role name, but the specific name of our role evades me. Well, not really, but I thought this would be a good opportunity to explore another command that will help us see a list of the available roles to be installed. Type the following command to see the list of roles:
Get-WindowsFeature
- Whoa! There's a big list of all the roles and features that can be installed on this server. Scrolling up, I can see Web Server (IIS) in the list, and it looks like the role name is Web-Server. I am going to keep that name ...