server 2012 Configure IP address using netsh command

To know how to configure Windows 2012 Server Core is very important because lots of the Servers will be the Server Core machine in future. So you need to know how to administer them locally and remotely.
The interesting thing is, most of the command which we used to perform in command prompt earlier, can still be used using PowerShell console through aliases.

Today I’ll describe how to configure some of the basic properties using netshnetdom and sconfigcommand.

Configure IP address using netsh command

Using netsh you can configure your IP property as necessary.
To know about network interfaces enter the below command in command prompt

netsh interface ipv4 show interfaces

Microsoft has changed The local area network connection name to Ethernet. You can use the below command to change the IP address
netsh interface ipv4 set address name=ethernet source=static address= mask= gateway=

DNS Server configuration

User the below command to configure DNS.

netsh int ipv4 add dnsserver name=ethernet address= index=1
Here index= 1 means it will be primary DNS server and int means interface

Change the computer name

To know the existing computer name enter ipconfig /all in command prompt, you will find the Host Name.
If you enter set command from command prompt, it will also show you the computer name with a list of environment variables.

Or if you enter hostname command, it will also return you the name of the host.

Rename the computer

To rename the computer use the below command

netdom renamecomputer %computername% /newname:MYServer01 /userd:Administrator /password /reboot:0

Here %computername% can be used if you don’t know the existing computer name and 0 means it will reboot within 0 second.

To join a computer in a domain

netdom join %computername% / /userd:Administrator /passwordd: /reboot:5

If you leave the password blank as I have written here, it will prompt you to enter password before joining that host to domain. It is a better approach rather typing the password in visible mode.

Create an local User Account

To create an user account use below command
net user Sayem /add *

Here (*) means it will prompt you to enter password.

Adding user in a group
Use the below command to add a user in a group

net localgroup Administrators /add Sayem

To see the detail of a user enter the below command

net user Sayem

Using sconfig to configure server

One of the coolest tools you can use beside netsh and netdom to configure your server is sconfig. It will show you a list of menu to configure you Windows 2012 Server, which was first introduced in Server 2008 R2.
Enter sconfig in command prompt. It does allow you to do the same thing in a menu system which is easier to work with.

Enable ping using sconfig
By default windows firewall disabled the ping request. To enable it

Enter 4 as a choice to configure remote management

Enter selection 3 to enable ping

Enable remote administration
Though most of the enterprises use third party firewall and disable window firewall by default but if it is enabled in you server, you can disable the firewall if you are in a secure environment meaning a hardware firewall already in place and it is capable to serve that purpose.
To disable firewall use the below command

netsh advfirewall set allprofiles state off

To allow firewall for remote administration use below command

netsh advfirewall firewall set rule group=”remote administration” new enable=yes

If you want to reset everything in your firewall use below command

netsh advfirewall reset

Connect to the other computer remotely from computer management

You can use Computer Management from a Windows 7 host PC and remotely connect to a server which will allow you to use all those tools needed to configure your server remotely and do whatever you needed to do to that server. For example, to configure disk space or checking event logs.

From your host PC go to Computer Management
Right click on the Computer Management tree and Click on Connect to another computer

Enter the IP address and click OK to connect

You can now remotely configure most of the settings of that connected Server

Thanks, If you like this tutorial please share this article to your friends in FBTwitter,

No Comments

Add a Comment

Your email address will not be published. Required fields are marked *