Search
Close this search box.

How to install Windows Server 2008/2012 roles/features using PowerShell

Wednesday, December 12, 2012 12:00 PM

Let’s make it faster …

A simple PowerShell script

Import-Module Servermanager

Add-WindowsFeature Application-Server,Hyper-V,WAS -norestart

And of course shutdown –r at the end

List of roles and features: 

Role/Service or Main FeatureR/S/F NameInstallatiom command
DHCP ServerDHCP ServerDHCP
Print ServicesPrint ServerPrint-Services
 Internet PrintingPrint-Internet
 LPD ServicePrint-LPD-Service
Terminal ServicesTerminal ServicesTerminal-Services
 Terminal ServerTS-Terminal-Server
 TS LicensingTS-Licensing
 TS GatewayTS-Gateway
 TS Web AccessTS-Web-Access
 TS Session BrokerTS-Session-Broker
Active Directory Domain ServicesADN/A
 Active Directory Domain ControllerADDS-Domain-Controller
 Identity Management for UNIXADDS-Identity-Management
 Server for Network Information ServiceADDS-NIS
 Password SynchronizationADDS-Password-Sync
DNS ServerDNS 
File ServicesFile ServicesN/A
 Distributed File System (DFS)FS-DFS
 DFS NamespaceFS-DFS-Namespace
 DFS ReplicationFS-DFS-Replication
 File Server Resource ManagerFS-Resource-Manager
 Services for Network File SystemFS-NFS-Services
 Windows Search ServiceFS-Search-Service
 Windows Server 2003 File ServicesFS-Win2003-Services
 File Replication ServiceFS-Replication
 Indexing ServiceFS-Indexing-Service
Web ServerWeb Server (IIS)Web-Server
 Internet Information ServicesWeb-WebServer
 Common HTTP FeaturesWeb-Common-Http
 Static ContentWeb-Static-Content
 Default DocumentWeb-Default-Doc
 Directory BrowsingWeb-Dir-Browsing
 HTTP ErrorsWeb-Http-Errors
 HTTP RedirectionWeb-Http-Redirect
 Application DevelopmentWeb-App-Development
 ASP.NETWeb-Asp-Net
 .NET ExtensibilityWeb-Net-Ext
 ASPWeb-ASP
 CGIWeb-CGI
 ISAPI ExtensionsWeb-ISAPI-Ext
 ISAPI FiltersWeb-ISAPI-Filter
 Server Side IncludesWeb-Includes
 Health and DiagnosticsWeb-Health
 HTTP LoggingWeb-Http-Logging
 Logging ToolsWeb-Log-Libraries
 Request MonitorWeb-Request-Monitor
 TracingWeb-Http-Tracing
 Custom LoggingWeb-Custom-Logging
 ODBC LoggingWeb-ODBC-Logging
 SecurityWeb-Security
 Basic AuthenticationWeb-Basic-Auth
 Windows AuthenticationWeb-Windows-Auth
 Digest AuthenticationWeb-Digest-Auth
 Client Certificate Mapping AuthenticationWeb-Client-Auth
 IIS Client Certificate Mapping AuthenticationWeb-Cert-Auth
 URL AuthorizationWeb-Url-Auth
 Request FilteringWeb-Filtering
 IP and Domain RestrictionsWeb-IP-Security
 PerformanceWeb-Performance
 Static Content CompressionWeb-Stat-Compression
 Dynamic Content CompressionWeb-Dyn-Compression
 Management ToolsWeb-Mgmt-Tools
 IIS Management ConsoleWeb-Mgmt-Console
 IIS Management Scripts and ToolsWeb-Scripting-Tools
 Management ServiceWeb-Mgmt-Service
 IIS 6 Management CompatibilityWeb-Mgmt-Compat
 IIS 6 Metabase CompatibilityWeb-Metabase
 IIS 6 WMI CompatibilityWeb-WMI
 IIS 6 Scripting ToolsWeb-Lgcy-Scripting
 IIS 6 Management ConsoleWeb-Lgcy-Mgmt-Console
 FTP Publishing ServiceWeb-Ftp-Publishing
 FTP ServerWeb-Ftp-Server
 FTP Management ConsoleWeb-Ftp-Mgmt-Console
Active Directory Federation ServicesADFSNone
 Federation ServiceADFS-Federation
 Federation Service ProxyADFS-Proxy
 Web AgentsADFS-Web-Agents
 Claims-aware AgentADFS-Claims
 Windows Token-based AgentADFS-Windows-Token
Active Directory Lightweight Directory ServicesFormerly ADAMADLDS
Application ServerApplication ServerApplication-Server
 Application Server CoreAS-AppServer-Core
 Web Server SupportAS-Web-Support
 COM+ Network AccessAS-Ent-Services
 TCP Port SharingAS-TCP-Port-Sharing
 Windows Process Activation Service SupportAS-WAS-Support
 HTTP ActivationAS-HTTP-Activation
 Message Queuing ActivationAS-MSMQ-Activation
 TCP ActivationAS-TCP-Activation
 Named Pipes ActivationAS-Named-Pipes
 Distributed Transaction SupportAS-Dist-Transaction
 Incoming Remote TransactionsAS-Incoming-Trans
 Outgoing Remote TransactionsAS-Outgoing-Trans
 WS-Atomic Transaction SupportAS-WS-Atomic
Active Directory Certificate ServicesActive Directory Certificate ServicesN/A
 Certification AuthorityADCS-Cert-Authority or AD-Certificate
 Online Certificate Status ProtocolADCS-Online-Cert
Fax ServerFax ServerFax
Network Policy and Access ServicesNetwork Policy and Access ServicesNPAS
 Network Policy ServerNPAS-Policy-Server
 NPAS Routing and Remote Access ServicesNPAS-RRAS-Services
 Remote Access ServiceNPAS-RRAS
 RoutingNPAS-Routing
 Health Registration AuthorityNPAS-Health
Windows Deployment ServicesWindows Deployment ServicesWDS
Hyper-VHyper-VHyper-V
Failover ClusteringFailover ClusteringFailover-Clustering
Network Load BalancingNetwork Load BalancingNLB
Desktop ExperienceDesktop ExperienceDesktop-Experience
.NET Framework 3.0 Features.NET Framework 3.0 FeaturesNET-Framework
.NET Framework 3.0.NET Framework 3.0NET-Framework-Core
XPS ViewerXPS ViewerNET-XPS-Viewer
Windows Communication Foundation Activation ComponentsWindows Communication Foundation Activation ComponentsNET-Win-CFAC
HTTP ActivationHTTP ActivationNET-HTTP-Activation
Non-HTTP ActivationNon-HTTP ActivationNET-Non-HTTP-Activ
Windows System Resource ManagerWindows System Resource ManagerWSRM
Wireless NetworkingWireless NetworkingWireless-Networking
Windows Server BackupWindows Server BackupBackup
WINS ServerWINS ServerWINS-Server
Remote AssistanceRemote AssistanceRemote-Assistance
Simple TCP/IP ServicesSimple TCP/IP ServicesSimple-TCPIP
Telnet ClientTelnet ClientTelnet-Client
Telnet ServerTelnet ServerTelnet-Server
Subsystem for UNIX-based ApplicationsSubsystem for UNIX-based ApplicationsSubsystem-UNIX-Apps
RPC over HTTP ProxyRPC over HTTP ProxyRPC-over-HTTP-Proxy
SMTP ServerSMTP ServerSMTP-Server
LPR Port MonitorLPR Port MonitorLPR-Port-Monitor
Storage Manager for SANsStorage Manager for SANsStorage-Mgr-SANS
BITS Server ExtensionsBITS Server ExtensionsBITS
Message QueuingMessage QueuingMSMQ
 Message Queuing ServicesMSMQ-Services
 Message Queuing ServerMSMQ-Server
 Directory Service IntegrationMSMQ-Directory
 Message Queuing TriggersMSMQ-Triggers
 HTTP SupportMSMQ-HTTP-Support
 Multicasting SupportMSMQ-Multicasting
 Routing ServiceMSMQ-Routing
 Windows 2000 Client SupportMSMQ-Win2000
 Messaging Queue DCOM ProxyMSMQ-DCOM
Windows Process Activation ServiceWindows Process Activation ServiceWAS
 Process ModelWAS-Process-Model
 .NET EnvironmentWAS-NET-Environment
 Configuration APIsWAS-Config-APIs
Windows Internal DatabaseWindows Internal DatabaseWindows-Internal-DB
BitLocker Drive EncryptionBitLocker Drive EncryptionBitLocker
Multipath I/OMultipath I/OMultipath-IO
Internet Storage Naming ServerInternet Storage Naming ServerISNS
Removable Storage ManagerRemovable Storage ManagerRemovable-Storage
TFTP ClientTFTP ClientTFTP-Client
SNMP ServicesSNMP ServicesSNMP-Services
 SNMP ServiceSNMP-Service
 SNMP WMI ProviderSNMP-WMI-Provider
Services for Network File SystemServices for Network File SystemNFS-Services
Internet Printing ClientInternet Printing ClientInternet-Print-Client
Peer Name Resolution ProtocolPeer Name Resolution ProtocolPNRP
Connection Manager Administration KitConnection Manager Administration KitCMAK
Remote Server Administration ToolsRemote Server Administration ToolsRSAT
 Role administration toolsRSAT-Role-Tools
 Active Directory Certificate Services ToolsRSAT-ADCS
 Active Directory Domain Services ToolsRSAT-ADDS
 Active Directory Domain Controller ToolsRSAT-ADDC
 Server for NIS ToolsRSAT-SNIS
 Active Directory Lightweight Directory Services ToolsRSAT-ADLDS
 Active Directory Rights Management Services (AD RMS) ToolsRSAT-RMS
 DHCP Server ToolsRSAT-DHCP
 DNS Server ToolsRSAT-DNS
 Fax Server ToolsRSAT-Fax
 DFS Management Console ToolsRSAT-DFS-Mgnt-Con
 File Server Resource Manager Management Console ToolsRSAT-FSRM-Mgnt
 Hyper-V ToolsRSAT-Hyper-V
 Services for Network File System ToolsRSAT-NFS-Admin
 File Services ToolsRSAT-File-Services
 Network Policy and Access Services ToolsRSAT-NPAS
 Health Registration Authority ToolsRSAT-HRA
 Network Policy Server ToolsRSAT-NPS
 Print Services ToolsRSAT-Print-Services
 Web Server (IIS) ToolsRSAT-Web-Server
 Terminal Services ToolsRSAT-TS
 TS RemoteApp ToolsRSAT-TS-RemoteApp
 TS Gateway ToolsRSAT-TS-Gateway
 TS Licensing ToolsRSAT-TS-Licensing
 UDDI Services ToolsRSAT-UDDI
 Feature administration toolsRSAT-Feature-Tools
 BitLocker Drive Encryption ToolsRSAT-BitLocker
 BITS Server Extensions ToolsRSAT-BITS-Server
 Failover Clustering ToolsRSAT-Clustering
 Network Load Balancing ToolsRSAT-NLB
 SMTP Server ToolsRSAT-SMTP
 Windows Deployment Services ToolsRSAT-WDS
 WINS Server ToolsRSAT-WINS
 Hyper-V ToolsRSAT-Hyper-V
Windows PowerShellWindows PowerShellPowerShell
Group Policy ManagementGroup Policy ManagementGPMC
Quality Windows Audio Video ExperienceQuality Windows Audio Video ExperienceQwave 
This article is part of the GWB Archives. Original Author: Waclaw Chrabaszcz

Related Posts