A fresh installation of Windows Server is given a randomly generated hostname (e.g., WIN-49U8A91) and relies on DHCP. You need to configure these base settings before promoting it to a Domain Controller or File Server.
We highly recommend using PowerShell for speed, but the GUI steps are provided below.
1. Rename the Server
Rename-Computer -NewName "DC-01" -Restart
- Open Server Manager and click on Local Server in the left pane.
- Click the randomly generated name next to Computer name.
- Click the Change… button.
- Enter
DC-01and click OK. You will be prompted to restart.
2. Set a Static IP Address
# Find your Interface Index (ifIndex)
Get-NetAdapter
# Assume the ifIndex is 3. Set the IP and Gateway.
New-NetIPAddress -InterfaceIndex 3 -IPAddress "10.10.10.30" -PrefixLength 24 -DefaultGateway "10.10.10.1"
# Set the DNS Server
Set-DnsClientServerAddress -InterfaceIndex 3 -ServerAddresses "8.8.8.8"
- Press
Win + R, typencpa.cpl, and press Enter. - Right-click your Ethernet adapter and select Properties.
- Double-click Internet Protocol Version 4 (TCP/IPv4).
- Select “Use the following IP address” and manually enter
10.10.10.30, Subnet255.255.255.0, and Gateway10.10.10.1.
3. Enable Remote Desktop (RDP)
By default, RDP is disabled for security.
# Enable RDP in the registry
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -value 0
# Allow RDP through the Windows Firewall
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
- Open Server Manager -> Local Server.
- Next to Remote Desktop, click the word Disabled.
- Check Allow remote connections to this computer and click OK.