Roles and Features - Paiet/Tech-Journal-for-Everything GitHub Wiki

** Interface Deltas** https://blogs.technet.microsoft.com/ken_brumfield/2016/10/25/deltas-between-windows-server-2016-desktop-experience-and-core/ Roles, Role Services, and Features https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc754923(v=ws.11)

  • PowerShell does not assume Management tools like the wizard does.

  • Server Role- a bundle of programs which will allow the computer to fulfill a certian function after a correct installation and configuration.

  • Role Services- (Sub roles) that provide role functionalities

  • Features- Programs that can handle or expand the functionaltiy of one or more roles, or an entire server.

  • Most server roles and features are independent of each other. However, some roles have dependencies that require other roles.

  • To add the Active Directory Rights Management Services role, you need to add the Web Server (IIS) role.

  • The Active Directory Domain Services role requires DNS so you can use the DNS Server role or a third-party DNS solution. Most roles also have an applicable feature that you can add to manage the role.

  • For example, when you add the DHCP Server role, you should install the DHCP Server Tools feature. You should do this because it enables you to manage the DHCP server locally with a management console. Optionally, if you plan to manage the DHCP server from a different computer, you could add only the role and not the feature (and instead add the feature on another computer).

Get-WindowsFeature

  • FOD enables admins to conserve disk spce by removing specific features not only from operation but also from the WinSxS Directory

  • 3 states are:

    • Enabled (installed)
    • Disabled (but still available)
    • Disabled with payload removed -Remove paramater
  • Stored SxS file Side by Side component store, The side by side store can take up a good amount of space.

  • Located at: %systemroot%\WinSxS

  • When viewed in File Explorer, it can appear to be larger in size, but that is misleading due to hard links that are in use. *To determine exact size run: Dism /online /Cleanup-Image /analyzecomponentstore *to clean use Dism /online /Cleanup-Image /StartComponentCleanup

Adding roles and features in the GUI locally and remote

  • Install a role, be mindful of any pre-requisites.
  • I'm going to install Hyper-V.
  • The export option on the wizard can be used in a script for mass deployment.

Roles and Features Pt 2

Working with roles and features by using PowerShell locally and remote Get-WindowsFeature Install-WindowsFeature --Name Print-Services --IncludeAllSubFeature -- IncludeManagementTools --Restart Get-WindowsFeature Print-Services

Add Roles to Remote servers Install-WindowsFeature -Name < name of role or feature > -ComputerName < hostname of remote server >

Removing server roles and features Get-WindowsFeature *print Uninstall-WindowsFeature -Name

  • Check work Get-WindowsFeature

Uninstall-WindowsFeature -WINS --Remove Get-WindowsFeature

  • If you atttempt to enable the feature again, the system will download it form windows update, or retrieve it from a specified image file using
  • -Source
  • Or specify alternative source path in the wizard
  • To remove all unused role and feature supporting files use the following one-liner (Note this will take a little bit): Get-WindowsFeature | Where-Object {$_.InstallState -Eq "Available"} | Uninstall-WindowsFeature -Remove