2k12 Core Service Basic Configuration
Introduction
The following article provides the steps required in PowerShell to configure the basics on a Windows 2012 Core Services server.
The article will provide the steps required to perform the following configurations :-
- Rename the server
- Configure IPv4 details for a network adapter
- Configure DNS Server for a network adapter
- Enable RDP access
Opening Powershell
The first thing to do after logging on to the Windows 2012 Core Services server is to open Powershell. To open Powershell on the server perform the following steps :-
- In the Command Prompt execute the following to open an additional Command Prompt window
start cmd
- In the newly opened Command Prompt window execute the following to open Powershell
powershell
I prefer to open an additional Command Prompt to do things on a Core Services server so that if I type exit by mistake I don’t have to start the Command Prompt window again through the Task Manager.
Rename The Server
The first step is to rename the server from the WIN-xxxxxxxxxx name randomly generated. To rename the server perform the following steps :-
- In Powershell execute the following to rename the server
Rename-Computer -NewName “{your server name}” -Restart
E.G. Rename-Computer -NewName “MyServer” -Restart
- The server will now be restarted and renamed
Configure IPv4 Details For A Network Adapter
The next step is to configure the server’s IPv4 details by performing the following steps :-
- In Powershell execute the following to find the Network Adapter Index Number
get-netadapter -Physical
- A list of the Physical Network Interfaces ont he server will be displayed.
N.B. For the purposes of this article only one Network Adapter was used on the Virtual Machine
- Next configure the IPv4 Address, Default Gateway, and Subnet Mask (Using the -prefixlength option) by executing the following command
New-NetIPAddress -IPAddress xxx.xxx.xxx.xxx -defaultgateway xxx.xxx.xxx.xxx -prefixlength 24 -interfaceindex 12
E.G. New-NetIPAddress -IPAddress 192.168.0.100 -defaultgateway 192.168.0.254 -prefixlength 24 -interfaceindex 12
- Once the command executes it will display the IPv4 Settings applied to the server
Configure A DNS Server For A Network Adapter
The next step is to configure the DNS Server for the Network Adapter by performing the following steps :-
- In Powershell execute the following to find the configure a DNS Server
Set-DNSClientServerAddress -InterfaceIndex 12 -ServerAddresses xxx.xxx.xxx.xxx
E.G. Set-DNSClientServerAddress -InterfaceIndex 12 -ServerAddresses 192.168.0.1
Enable RDP Access
The last step in this article is to enable RDP Access to the server by performing the following steps :-
- In Powershell execute the following to find the configure a DNS Server
get-CimInstance “Win32_TerminalServiceSetting” -Namespace root\cimv2\terminalservices | Invoke-CimMethod -MethodName setallowtsconnections -Arguments @{AllowTSConnections =1; ModifyFirewallException = 1}