programming4us
programming4us
DESKTOP

Windows Server 2008 : Adding Roles to Server Core - Using dism to Add Roles to Windows Server 2008 R2

12/22/2013 1:35:52 AM

1. Using dism to Add Roles to Windows Server 2008 R2

Windows Server 2008 R2 uses dism instead of ocsetup to add additional roles. The basic syntax is

dism /online /enable-feature /featurename: feature-name

For a full list of roles and features you can add, use the following command:

dism /online /get-features /format:table

Note

dism is not available on the Windows Server 2008 Server Core installation. However, it is available by default on Windows Server 2008 R2 and Windows Server 2008 R2 Server Core installations.


Tip

The feature-name must be entered using the exact case as shown in the get-features output. This is one of the few times when upper- and lowercase matters with the command prompt (just as it matters with the ocsetup command used with Windows Server 2008 Server Core).


Some roles require additional steps to configure. The following sections show how to add and configure various roles.

Adding the DHCP Server Role with dism

The following table shows the syntax to add the DHCP role.

Commands for DHCPComments
C:\>dism /online
/enable-feature
/featurename:
DHCPServerCore

Adds the DHCP role.
C:\>sc config dhcpserver
start= auto

Configures the DHCP Server service to start automatically.
C:\>net start dhcpserver

Starts 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:\>dism /online
/disable-feature
/featurename:
DHCPServerCore

Removes the DHCP role.

Adding the DNS Server Role with dism

The following table shows the syntax to add the DNS role.

Commands for DNSComments
C:\>dism /online /enable-
feature /featurename:
DNS-Server-Core-Role

Adds the DNS role.

Tip

After the DNS Server role is added, you can configure it remotely using a DNS console on a different system.

C:\>dism /online /disable-
feature /featurename:
DNS-Server-Core-Role

Removes the DNS role.

Adding File Services with dism

The following table shows the syntax to add the various file services.

Note

When you add any of the file services, the server is configured as a File Server.


Commands for File ServicesComments
C:\>dism /online /enable-feature
/featurename:FRS-infrastructure

Adds the File Replication service.
C:\>dism /online /enable-feature
/featurename:DFSN-Server

Adds the Distributed File System service.
C:\>dism /online /enable-feature
/featurename:ClientForNFS-Base

Adds the Distributed File System Replication service.
C:\>dism /online /enable-feature
/featurename:ServerForNFS-Base

Adds Base Services for NFS.
C:\>dism /online /enable-feature
/featurename:ClientForNFS-Client

Adds Client Services for NFS.

Adding the Print and Document Services Role with dism

The following table shows the syntax to add the Print and Document Services role.

Commands for Print ServicesComments
C:\>dism /online /enable-feature
/featurename:Printing-ServerCore-Role

Adds the Print Services role.
C:\>dism /online /enable-feature
/featurename:Printing-ServerCore-Role-WOW64

Adds 32-bit Print Server support.
C:\>dism /online /enable-feature
/featurename:Printing-LPDPrint-Service

Adds the LPD service.

Adding the AD CS Role with dism

The following table shows the syntax to add and remove the AD CS role.

Commands to Add PowerShellComments
C:\>dism /online /enable-feature
/featurename:Certificate Services

Installs the AD CS role.
C:\>dism /online /disable-feature
/featurename:Certificate Services

Removes the AD CS role.

Adding the AD LDS Role with dism

The following table shows the syntax to add and remove the AD LDS role.

Commands to Add PowerShellComments
C:\>dism /online /enable-feature
/featurename: DirectoryServices-ADAM-
ServerCore

Installs the AD LDS role.
C:\>dism /online /disable-feature
/featurename: DirectoryServices-ADAM-
ServerCore

Removes the AD LDS role.

Adding PowerShell with dism

The following table shows the syntax to add PowerShell.

Note

PowerShell is not supported in Windows Server 2008 Server Core, but it is supported in Windows Server 2008 R2 Server Core.


Commands to Add PowerShellComments
C:\>dism /online /enable-feature
/featurename:MicrosoftWindowsPowerShell

Installs Windows PowerShell.
C:\>\windows\system32\
WindowsPowerShell\v1.0\powershell.exe

Starts PowerShell.

2. Adding the AD DS Role

You use the dcpromo tool with an unattend file to install AD DS on a Windows Server 2008 or Windows Server 2008 R2 Server Core server. The basic syntax is

dcpromo /unattend:unattend-file


Other  
  •  Windows Server 2008 : Adding Roles to Server Core - Using ocsetup to Add Roles to Windows Server 2008 (part 1)
  •  Windows Server 2008 : Adding Roles to Server Core - Using ocsetup to Add Roles to Windows Server 2008 (part 1)
  •  Windows Server 2008 : Configuring Server Core for Remote Administration - Enabling Access with Remote Microsoft Management Consoles
  •  Windows Server 2008 : Configuring Server Core for Remote Administration - Using the Server Core Registry Editor
  •  Managing Windows Server 2012 (part 13) - Using Remote Desktop - Supporting Remote Desktop Connection clients
  •  Managing Windows Server 2012 (part 12) - Using Remote Desktop - Remote Desktop essentials, Configuring Remote Desktop
  •  Managing Windows Server 2012 (part 11) - Optimizing toolbars
  •  Managing Windows Server 2012 (part 10) - Customizing the desktop and the taskbar - Using Auto Hide and locking, Controlling programs in the notification area
  •  Managing Windows Server 2012 (part 9) - Customizing the desktop and the taskbar - Configuring desktop items, Configuring the taskbar
  •  Managing Windows Server 2012 (part 8) - Using the System console
  •  
    video
     
    Video tutorials
    - How To Install Windows 8

    - How To Install Windows Server 2012

    - How To Install Windows Server 2012 On VirtualBox

    - How To Disable Windows 8 Metro UI

    - How To Install Windows Store Apps From Windows 8 Classic Desktop

    - How To Disable Windows Update in Windows 8

    - How To Disable Windows 8 Metro UI

    - How To Add Widgets To Windows 8 Lock Screen

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010
    programming4us programming4us
    programming4us
     
     
    programming4us