To configure the IP address , first we need to check the interfaces (NIC)
use the following command to see the attached interfaces
netsh interface ipv4 show interfaces
Now we can see the interfaces
lets see how we are going to configure IP address to local area connection 2
netsh interface ipv4 set address name="local area connection2" source=static address=10.1.1.10 mask=255.255.255.0 gateway=10.1.1.1
look still we haven't configured the DNS details, so we will see how we can configure DNS
netsh interface ipv4 add dnsserver name="local area conncetion2" address= 10.1.1.30 index=1
I am sure you can understand we are configuring DNS on local area connection 2 interface but what is that INDEX=1??
Since we all know that there is always we have primary and secondary DNS so the index 1 says us that we are configuring this IP address as primary DNS.
now after we configured the IP address details we are going to add this server to domain, so before add the server to domain we have to check the hostname and change the hostname to a meaning full name.
So we will see how to do this.
to check the hostname simply type "hostname" and hit enter it will display the configured hostname, So its all fine now we need to change the hostname. Here we go
netdom renamecomputer /newname: /userd:Administrator /passwordd: /reboot:1
this will ask to enter the password of the Administrator user and immediately reboot the server (reboot=1)
now we have changed the hostname and going to add this server to domain,
netdom join /domain:test.com.au /userd:Administrator /passwordd: /reboot:5
this will add the host to domain test.com.au and reboot the server in 5 seconds.
So now we have configured the IP address, changed the hostname and added the server to Domain , now what else we have to do more? Yes we need the user account to access the server, Lets configure that also.
net user User1 /add
this will ask you to enter the password for the newly created user called user1, now we will add this user to administrator group
net localgroup administrators /add user1
That is all we have done it. The same configuration we can do easily if we use the following command
>sconfig this will prompt you with all the options , simply we have to select the option number and enter the relevant details.