Managing and Configuring a Server Core Installation
The following sections cover general tasks associated with managing and configuring a Server Core system via the command prompt after the installation is complete. As an alternative, an administrator can use the SCONFIG utility to configure general settings.Launching the Command Prompt in a Server Core Installation
Remember, the Start menu does not exist. Because of this, one of the most important tasks an administrator must understand when managing a Server Core installation is how to launch a PowerShell console session. The following steps will assist you:- Press Ctrl+Alt+Delete.
- Select Start Task Manager.
- On the Windows Task Manager screen, select File, New Task (Run).
- In the Create New Task dialog box, type powershell.exe, and then click OK.
Changing the Server Core Administrator’s Password
After the initial password has been set, the syntax to change the administrator password is as follows:Net user administrator *
After the command has been executed, you are prompted to type a password for the user. Enter the password and then retype it for the confirmation process. It is a best practice to use a complex password when assigning passwords to the administrator account and the default password policy on the server will require complex passwords.
Changing the Server Core Machine Name
After the Server Core installation is complete, another common task is to change the machine name of the server. By default, Windows automatically generates and assigns a server name starting with WIN and followed by a string of characters. The syntax to change the Server Core machine name follows:netdom renamecomputerWhen executing this command, replace the/newname:
netdom renamecomputer Win-123 /newname:ABCDC2The same function can be performed using PowerShell with the following command:
Rename-computer –NewName ABCDC2
Assigning a Static IPV4 IP Address and DNS Settings
Another common Server Core management task is assigning an IP address, including the primary and secondary DNS settings. Before this task can be executed, you must run the following command to obtain and identify the names of the network interfaces installed on the server. This includes capturing the unique ID associated with each network interface. To display a list of network interfaces, including their respective unique IDs, run the following command:netsh interface ipv4 show interfacesThe next step is to make a note of the network interface name and unique ID that you must change. The ID is located in the leftmost column and is referred to as Idx. This is depicted in the output of the netsh interface ipv4 show interfaces command, as displayed in Figure 3.8.
Now that you have captured the names and IDs, use the following syntax to change the IP address for a desired interface:
netsh interface ipv4 set address name="" source=static address= mask= gateway=
Replace the ID argument with the network interface name or ID. In addition, enter the static IP address, subnet mask, and default gateway in subsequent arguments, as follows:
netsh interface ipv4 set address name="1" source=static ad dress=192.168.115.10 mask=255.255.255.0 gateway=192.168.115.1.
The final step when configuring the network interface is to enter a primary and secondary DNS entry for the interface. Do this by using the following syntax:
netsh interface ipv4 add dnsserver name="" address= index=1
The same command is used and repeated when entering more than one DNS entry. However, increment the index each time. When finalized, run IP Config /all to verify the IP address settings.
The same function can be performed using PowerShell with the following commands:
Get-NETIPInterface Set-NetIPAddress –InterfaceIndex 12 –IPv4Address 192.168.115.10 –PrefixLength 24 –DefaultGateway 192.168.115.1 Set-DNSClientServerAddress –InterfaceIndex 12 –ServerAddresses "DNSIP1","DNSIP2"
Adding the Server Core System to a Domain
The following script illustrates the basic syntax to add a Server Core system to a Windows domain:Netdom joinInput the domain name and the target OU. Supply the user account and password for an account that has permissions to add computers to the domain./domain: /OU: /userd: \ /passwordD:*
The same function can be performed using PowerShell with the following commands:
Add-Computer -domainname-OUPath "OU=OU,=Domain,DC=com"
Activating the Server Core System
Activating a Server Core system can be achieved in two easy steps. First, you enter a product key, and then you activate the server. The syntax to enter a product key is as follows:slmgr.vbs –ipk
After the product key has been successfully entered, you activate the server by typing in the following command.
slmgr.vbs –ato
Using SCONFIG to Configure a Server Core Installation
As mentioned previously, Windows Server 2012 includes a utility to make the initial configuration or a core installation easier. The SCONFIG utility, which has been available since Windows Server 2008 R2, is very easy to use and is usually the preferred configuration option if scripting is not required.The utility can be executed by running sconfig.exe in the core installation command prompt and presents the set of options shown in Figure 3.9.
Server Core Roles and Feature Installations
The typical Windows server roles can be configured on a Server Core installation. The following server roles are currently supported on a Server Core installation:- Active Directory Certificate Services
- Active Directory Domain Services (AD DS)
- Active Directory Lightweight Directory Services (AD LDS)
- Active Directory Rights Management Server
- DHCP Server
- DNS Server
- File and Storage Services
- Hyper-V
- Print and Document Services
- Remote Access Server
- Remote Desktop Services (partial support)
- Connection Broker
- Licensing
- Virtualization Host only
- Volume Activation Services
- Web Server (IIS)
- Windows Deployment Services
- Windows Software Update Services
- .NET Framework 4.5
- BITS Compact Server
- BitLocker Drive Encryption
- BranchCache
- Failover Clustering
- Group Policy Management
- IP Address Management (IPAM) Server
- Multipath I/O
- Network Load Balancing
- Remote Server Administration Tools (partial)
- Simple Network Management Protocol (SNMP)
- Telnet Client
- Windows PowerShell 2.0
- Windows Server Backup
ocsetup.exe [/?] [/h] [/help] component [/log:file] [/norestart] [/passive] [/quiet] [/unattendfile:file] [/uninstall] [/x: parameter]Table 3.3 describes each of the options that are available when using the OCSetup command-line program.
Table 3.3. Available Command Options for OCSetup
Parameter | Description |
/?, /h, /help | Explains all the options available for OCSetup |
component | Represents the name of the component you plan on installing, such as DNS, DHCP, Web Server (IIS), and more |
/log:file | Specifies the log file location if you do not want to take advantage of the default location |
/norestart | Does not reboot the computer after the installation |
/passive | Suppresses unnecessary noise and only includes progress status |
/quiet | Does not require user interaction |
/unattendfile:file | Requires additional configurations |
/uninstall | Removes server components |
/x: parameter | Supplies additional configuration parameters |
Using Powershell to Install a Server Role on a Server Core Installation
In addition to OCSetup, Powershell can be used to install roles and features, as follows:- Run PowerShell by executing powershell.exe in the command prompt.
- Run import-module servermanager to enable Server Manager features within the PowerShell session.
- Use Get-WindowsFeature to identify installed and available roles and features.
- Use Add-WindowsFeature to add the required role or feature. Table 3.4 outlines an example of common server role installations using Add-WindowsFeature.
Table 3.4. Server Role Installation Command Lines with PowerShell
Server Role | Command |
DNS Server role | Add-WindowsFeature DNS |
DHCP Server role | Add-WindowsFeature DHCP |
File Server role | Add-WindowsFeature File-Services |
Print Server role | Add-WindowsFeature Print-Server |
Active Directory Lightweight Directory Server role | Add-WindowsFeature ADLDS |
Windows Server Update Services role | Add-WindowsFeature UpdateServices |
Web Server (IIS) role | Add-WindowsFeature Web-Server |
Remote Access role | Add-WindowsFeature RemoteAccess |
Hyper-V role | Add-WindowsFeature Hyper-V |
Installing the Active Directory Domain Services Role
Installation of AD DS is more complex and vital to the operation of the environment and therefore deserves more detailed attention. Installation of the role using Add-WindowsFeature AD-domain-services will install the required binaries but not configure the server as a domain controller.In earlier versions, the recommended tool for that is the dcpromo utility. The problem is that dcpromo normally starts a wizard with a GUI that is not supported on Server Core. As a result, the dcpromo utility on server core is a command-line utility that requires input by supplying the operation parameters or by using an answer file.
The dcpromo utility can accept more than 30 different operation parameters. Although this might seem like a dizzying array of options, few command lines will use all of them. Refer to the TechNet dcpromo command reference at http://technet.microsoft.com/en-us/library/cc732887(WS.10).aspx for a complete list and explanation of each parameter. You can use this reference to build the correct dcpromo command line or create an unattend file suitable for your core domain controller.
As with many other aspects of the operating system, Windows Server 2012 provides PowerShell support to perform that same function. Promoting a domain controller using PowerShell is very convenient and is based on the ADDSDeployment module, which includes the following commands:
- Install-ADDSForest
- Install-ADDSDomain
- Install-ADDSDomainController
For example, use the following command to get the syntax for the Install-ADDSForest cmdlet:
Get-Help Install-ADDSForest
Then, using the following syntax to install a new Windows 2012 forest with a root domain called abc.com:
Install-ADDSForest –ForestMode "Win8" –DomainMode "Win8" –DomainName "abc.com" –DomainNetBIOSName "ABC" –DatabasePath "C:\Windows\NTDS" –LogPath "C:\Windows\NTDS" –SYSVOLPath "C:\Windows\SYSVOL" –InstallDNS:$true –CreateDNSDelegation:$false –RebootOnCompletion:$true –Force:$true
You will be prompted for the safe mode boot password, and the forest will be created. The server reboots upon completion as specified in the command.
No comments:
Post a Comment