2.1 Adding the DHCP Server Role with ocsetup
The following table shows the syntax to add DHCP. Figure 2 shows these commands in the Server Core prompt.
Commands for DHCP | Comments |
---|
C:\>start /w ocsetup DHCPServerCore
| Add DHCP role. |
C:\>sc config dhcpserver start= auto
| Configure the DHCP Server service to start automatically.
Tip
There must be a space after the equal sign (=), but there cannot be a space before it in this command. In other words, it’s start=, a space, and then auto.
|
| Start the DHCP Server service.
Tip
After the DHCP Server role is added and the DHCP Server service is
started, you can configure DHCP remotely using a DHCP console on a
different system.
|
C:\>start /w ocsetup DNS-Server-Core-Role /uninstall
| Remove DHCP role. |
2.2 Adding the DNS Server Role with ocsetup
The following table shows the syntax to add DNS.
Commands for DNS | Comments |
---|
C:\>start /w ocsetup DNS-Server-Core-Role
| Add DNS role.
Tip
After the DNS Server role is added, you can configure it remotely using a DNS console on a different system.
|
C:\>start /w ocsetup DNS-Server-Core-Role /uninstall
| Remove DNS role. |
2.3 Adding File Services with ocsetup
The following table shows the syntax to add the various file services.
Note
When you add the file services, the server is configured as a File Server.
Commands for File Services | Comments |
---|
C:\>start /w ocsetup FRS-Infrastructure
| Add the File Replication service. |
C:\>start /w ocsetup DFSN-Server
| Add the Distributed File System service. |
C:\>start /w ocsetup DFSR-Infrastructure-ServerEdition
| Add the Distributed File System Replication service. |
C:\>start /w ocsetup ServerForNFS-Base
| Add Base Services for Network File System (NFS). |
C:\>start /w ocsetup ClientForNFS-Client
| Add Client Services for NFS. |
2.4 Adding the Print Services Role with ocsetup
The following table shows the syntax to add the Print Services role.
Commands for Print Services | Comments |
---|
C:\>start /w ocsetup Printing-ServerCore-Role
| Add the Print Services role. |
C:\>start /w ocsetup Printing-LPDPrintService
| Add the Line Printer Daemon (LPD) service. |
C:\>start /w ocsetup Printing-ServerCore-Role /uninstall
| Remove the Print Services role. |
2.5 Adding the Web Server (IIS) Role with pkgmgr
The following table shows the syntax to add the Web Server (IIS) role.
Note
Internet Information Services (IIS) is installed when the Web Server (IIS) role is added.
Commands for Web Server | Comments |
---|
C:\>start /w pkgmgr /iu:IIS-WebServerRole;WAS- WindowsActivationService;WAS-ProcessModel
| Adds the Web Server role with a default installation. |
C:\>start /w pkgmgr /iu:IIS-WebServerRole;IIS- WebServer;IIS-CommonHttpFeatures;IIS- StaticContent;IIS-DefaultDocument;IIS- DirectoryBrowsing;IIS-HttpErrors;IIS- HttpRedirect;IIS-ApplicationDevelopment;IIS- ASP;IIS-CGI;IIS-ISAPIExtensions;IIS- ISAPIFilter;IIS-ServerSideIncludes;IIS- HealthAndDiagnostics;IIS-HttpLogging;IIS- LoggingLibraries;IIS-RequestMonitor;IIS- HttpTracing;IIS-CustomLogging;IIS- ODBCLogging;IIS-Security;IIS- BasicAuthentication;IIS-WindowsAuthentication; IIS-DigestAuthentication; IIS-ClientCertificateMappingAuthentication; IIS-IISCertificateMappingAuthent ication;IIS-URLAuthorization;IIS- RequestFiltering;IIS-IPSecurity;IIS- Performance;IIS-HttpCompressionStatic;IIS- HttpCompressionDynamic;IIS- WebServerManagementTools;IIS- ManagementScriptingTools;IIS- IIS6ManagementCompatibility;IIS-Metabase;IIS- WMICompatibility;IIS-LegacyScripts;IIS- FTPPublishingService;IIS-FTPServer;WAS- WindowsActivationService;WAS-ProcessModel
| Adds the Web Server role with all options.
Works for both Windows Server 2008 and Windows Server 2008 R2. |
C:\>start /w pkgmgr /uu:IIS-WebServerRole;WAS- WindowsActivationService;WAS-ProcessModel
| Removes the Web Server role. |