banner



How To Install Windows Server Roles And Features

How to Install Windows Features with PowerShell?


To install windows features on the server, Install-WindowsFeature cmdlet is used .

Install-WindowsFeature Windows-Server-Backup -LogPath C:\Temp\Installfeatures.txt -Verbose

In the above example, Windows-Server-Backup feature volition be installed on the local server and logs volition be stored at location C:\Temp and file proper name InstallFeatures.txt.

PS C:\Users\Administrator> Install-WindowsFeature Windows-Server-Fill-in -LogPath C:\Temp\Installfeatures.txt -Verbose VERBOSE: Installation started... VERBOSE: Go on with installation? VERBOSE: Prerequisite processing started... VERBOSE: Prerequisite processing succeeded. Success Restart Needed Exit Lawmaking Characteristic Result ------- -------------- --------- -------------- True No Success {Windows Server Backup} VERBOSE: Installation succeeded.

You tin also install the feature with the pipeline control,

Get-WindowsFeature Windows-server-backup | Install-WindowsFeature -LogPath C:\Temp\Installfeatures.txt -Verbose

If your windows characteristic includes the sub-features similar in the case of Web-Server (IIS) and which also needs management tools.

For the above scenario, we will utilize -IncludeAllSubFeature to include roles and -IncludeManagementTools to install management tools.

Install-WindowsFeature Web-Server -IncludeAllSubFeature -IncludeManagementTools -Source -Verbose

When you install any characteristic and don't provide any source path then make sure your windows operating system disk related to that particular OS should be loaded otherwise there volition an error generated for the source path.

Install-WindowsFeature Web-Server -IncludeAllSubFeature -IncludeManagementTools -verbose VERBOSE: Installation started... VERBOSE: Go along with installation? VERBOSE: Prerequisite processing started... VERBOSE: Prerequisite processing succeeded.  Success Restart Needed Get out Lawmaking Feature Result ------- -------------- --------- -------------- True No Success {Application Development, Application Init... VERBOSE: Installation succeeded.

If the Os disk is not mounted then you need to copy the SXS folder under Source directory from the related operating arrangement CD and provide that directory as the source path. For example,

Install-WindowsFeature Web-Server -IncludeAllSubFeature -IncludeManagementTools -Source C:\Temp\sxs\ -Verbose
PS C:\Users\Administrator> Install-WindowsFeature Spider web-Server -IncludeAllSubFeature -IncludeManagementTools -Source C:\Temp\sxs\ -Verbose VERBOSE: Installation started... VERBOSE: Go along with installation? VERBOSE: Prerequisite processing started... VERBOSE: Prerequisite processing succeeded.  Success Restart Needed Exit Code Feature Result ------- -------------- --------- -------------- True No Success {Awarding Development, Application Init. .. VERBOSE: Installation succeeded.

This -Name parameter supports multiple features. So we can install multiple features together similar GUI.

help Install-WindowsFeature -Parameter Name -Proper name <Feature[]>

For case,

Install-WindowsFeature -Proper noun Telnet-Customer, Search-Service -Verbose

Output

Install-WindowsFeature -Name Telnet-Client, Search-Service -Verbose VERBOSE: Installation started... VERBOSE: Go on with installation? VERBOSE: Prerequisite processing started... VERBOSE: Prerequisite processing succeeded. Success Restart Needed Exit Code Feature Result ------- -------------- --------- -------------- True No Success {Windows Search Service, Telnet Customer} VERBOSE: Installation succeeded.

To install windows features on the remote estimator, you tin use -ComputerName parameter. For case,

Install-WindowsFeature Telnet-Customer -ComputerName Test1-Win2k16 -Verbose

Output

VERBOSE: Installation started... VERBOSE: Keep with installation? VERBOSE: Prerequisite processing started... VERBOSE: Prerequisite processing succeeded. Success Restart Needed Exit Lawmaking Feature Outcome ------- -------------- --------- -------------- True No Success {Telnet Client} VERBOSE: Installation succeeded.

If nosotros check the allowed datatype for the -ComputerName parameter then it is a cord type, non the array so we tin can pass only 1 computer Name.

PS C:\Users\Administrator > help Install-WindowsFeature -Parameter ComputerName -ComputerName [<Cord>]

And then to install features on multiple computers, either we need to loop the -ComputerName using foreach loop or y'all can use Invoke-Command method. For convenience, we volition use the later on method.

Invoke-Control -ComputerName Test1-Win2k12, Test1-Win2k16 -ScriptBlock{Install-WindowsFeature Telnet-Customer}

raja

Published on 26-Aug-2020 08:20:43

  • Related Questions & Answers
  • How to Get Windows features using PowerShell?
  • How to remove windows features using PowerShell?
  • How to Install the Azure CLI on Windows using PowerShell?
  • How to remove Windows service with PowerShell?
  • How to Install Python on Windows?
  • How to install Python in Windows?
  • How to install PowerShell Module?
  • Guide to Install MongoDB with Python in Windows
  • How to Install C++ Compiler on Windows?
  • How to Install Azure PowerShell Cmdlets?
  • How to install OpenCV for C++ in Windows?
  • How to install a windows service using windows control prompt in C#?
  • How to beginning windows service with brandish name in PowerShell?
  • How to install DSC resources using PowerShell?
  • How to install the PowerShell Active Directory module?

Source: https://www.tutorialspoint.com/how-to-install-windows-features-with-powershell

Posted by: lemenmaress61.blogspot.com

0 Response to "How To Install Windows Server Roles And Features"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel