Once you install server core, you need to configure
the initial configuration of Windows Server. We can configure
server core in three ways,
A. Command
line
B. Power
shell
C. Server
configuration tool (sconfig)
1. Changing Default Server Name
The first step is to change the default server
name and you'll want to rename it as per your company naming conventions. Let do it with below option,
·
Command
line :- Use command "netdom
renamecomputer %computername% /newname:yourcomputername" to rename
computer and reboot server with command "shutdown -r -t 0" to
complete this operation.
·
PowerShell
:- Use command "Rename-Computer yourcomputername " and restart server with command "Restart-Computer" to take effect
or use "Rename-computer -NewName yourcomputername-Restart"
· Server Configuration Tool :- Enter command sconfig which open below portal and select appropriate option to rename computer.
When the system has restart, check the computer name with “hostname” command, whether changed or not yet.
2. Configure IP address
Most servers are configured with a static IP
address rather than having DHCP client enabled and receiving an IP address
dynamically from a DHCP server. You can use the command below to configure the IPv4 properties of a network connection with a
static IP address. Before running this command, ensure that you replace the
example parameter values with values that are appropriate for your network.
·
Command
line :- To show or list the
interface cards, just type: Netsh interface ipv4 show interface.
Now you see two
interface cards. Ethernet0 with index id 12 is the physical interface we should
set IP and configure it.
Type: Netsh
interface ipv4 show config Ethernet0. You can set index IP instead of the
interface name.
Above ip address
got from WI-FI router DHCP. To set new IP address type: Netsh interface ipv4
set address name=Ethernet0 static
192.168.5.100 mask=255.255.255.0 gateway=192.168.5.2 and press enter and type:
netsh interface ipv4 show config 12. to see if it work correctly.
·
PowerShell :- You can use above all command on powerShell
to configure network. Enter command "
Get-NetAdapter" to
get all interface card.
To set new IP
address type: New-NetIPAddress -InterfaceIndex 12 -IPAddress 192.168.5.101
-PrefixLength 24 -DefaultGateway 192.168.5.1 or New-NetIPAddress -IPAddress 192.168.5.101
-InterfaceAlias "Ethernet" -DefaultGateway 192.168.5.1-AddressFamily
IPv4 -PrefixLength 24
3. Configure a network
connection with a new DNS server address
·
Command
Line :- Use command "
Netsh interface ipv4 set dns name=12
static 192.168.5.200 primary" to configure a network connection with a new DNS
server address,
It shows an
error but works correctly. The error is the lack of DNS Server, if there is a
DNS server, we will not face with any errors.
·
PowerShell :- To
set DNS address use Set-DnsClientServerAddress -InterfaceIndex 12
-ServerAddresses 192.168.5.500
or Set-DnsClientServerAddress -InterfaceAlias
"Ethernet" -ServerAddresses 192.168.5.200
4. Install Active Directory Domain
Services (AD DS) and DNS.
·
First we install
the Active Directory Services Role using command "Install-WindowsFeature
AD-Domain-Services -IncludeManagementTools" then we'll create new domain
in new forest with command " Install-ADDSForest -DomainName
"sysadm.com""
If you get below
error while running above command then
first you need to install module server manager with command " import-module
servermanager".
5. Join server to Domain
·
Command line :- Join Server Core to a domain with “netdom join” command,
"netdom join %computername%
/domain:sysadm.com /userd:administrator /passwordd:* /reboot:10"
After the typing command, press enter and
enter the password then system will reboot after 10 second.
No comments:
Post a Comment