Now that our server is configured, we can install roles and features.
To do this, you will need the Powershell console that is already preinstalled.
To launch it, type :
Batch
start powershell
The "Windows PowerShell" program will appear.
In this console, you can use the DOS commands, as well as the PowerShell commands.
To install a role or feature, you will obviously need its name in PowerShell.
To know it, just use the command :
PowerShell
Get-WindowsFeature
Note : loading the list may take some time.
To know the roles and features that are currently installed on your server, you must use this command :
PowerShell
Get-WindowsFeature | Where-Object {$_.InstallState -eq "Installed"}
In Core mode, some roles and features are not available by default.
This means that you will need the Internet (to connect to Windows Update) or an installation media (installation DVD, for example) to install them.
To list these roles and features, use this command :
PowerShell
Get-WindowsFeature | Where-Object {$_.InstallState -eq "Removed"}
To add a role or feature, simply use the "Install-WindowsFeature" PowerShell command and specify the name of the role or the feature that you want to install.
For example, to install the Windows Server IIS web server, you must use this command :
PowerShell
Install-WindowsFeature Web-Server
Once installed, Windows will display 3 informations :
To remove a role or feature, the syntax is the same except that you will use the "Remove-WindowsFeature" command instead of "Install-WindowsFeature".
To uninstall the IIS web server, you must type :
PowerShell
Remove-WindowsFeature Web-Server
Once uninstalled, you will find the same 3 informations as above (Success, Restart Needed, Exit Code).
In this case, Windows Server asks us to restart the server.
To do this, you can use the DOS command "shutdown /r" or use the PowerShell command :
PowerShell
Restart-Computer
Windows Server 11/16/2018
Windows Server 11/23/2018
Pinned content
Contact
® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.
Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.
No comment