Sunday, 28 September 2014

How to rename a domain controller in Windows server 2008/R2

Understanding the concept

There are often scenarios that you need to rename your domain controllers, it can be either a primary domain controller or any of secondary controllers. This can be achieved by either through GUI or command line. However the recommended way to achieve this is through the command line using the command netdom. The netdom command updates the Service Principal Name (SPN) attributes in Active Directory Domain Services (AD DS) for the computer account. This command also registers Domain Name System (DNS) resource records for the new computer name. The SPN value of the computer account must be replicated to all domain controllers in the domain, and the DNS resource records for the new computer name must be distributed to all the authoritative DNS servers for the domain name. If the updates and registrations have not occurred before the removal of the old computer name, some clients might not be able to locate this computer using the new name or the old name. The only problem that may occur is that the corresponding nTFRSMember or msDFSR-Member object is not renamed automatically, but the reference attributes are correctly set so SYSVOL replication is not impacted. The potential problem with not renaming these objects is that if another domain controller is created at a later date with the same NetBIOS name of the old domain controller, then a conflict can occur. In order to avoid this conflict you can refer the MS article and avoid the issue that may occur in future.

Note: If you are renaming any of the secondary domain controllers please make sure that there is no replication issues between the domain controllers else you may face various issues during these steps.

Renaming the domain controller

Now let us consider that I am renaming my primary domain controller and its host name is that 'server-1' which we need to rename to 'server-001' and my domain is 'serverlabs.com'. To summarize the actions that we are going to perform, firstly we will add a secondary host name to the server which i want to rename and promote that secondary name as the primary host name of that server. Once it is done we will delete the old host name. 
1. Open a Command Prompt as an administrator: On the Start menu, right-click Command Prompt, and then click Run as administrator.
2.  type the following command to add the new domain controller name, and then press ENTER: The syntax is netdom computername CurrentComputerName/add:NewComputerName

<netdom computername> Manages the primary and alternate names for a computer.
<CurrentComputerName> The current, or primary, fully qualified DNS name of the computer that you are renaming.
</add:> Specifies that a new alternate DNS name should be added.
<NewComputerName> The new fully qualified DNS name for the computer that you are renaming.

In my case the command become,
netdom computername server-1 /add:server-001.serverlabs.com and press ENTER. Successfully executing the command will add a new domain controller name to your computer.

3. Now the domain controller has got two names. Make that secondary name of the server as its primary name for the domain controller.
netdom computername CurrentComputerName /makeprimary:NewComputerName
i.e, netdom computername server-1 /makeprimary:server-001.serverlabs.com and press ENTER.
Once the command is executed successfully you need to restart the server to make effect the changes. Please restart it and logon again.
4. If you check the domain controller's name you can observe that it's name has changed. Now you need to remove the old domain controller name. Once again open command prompt as administrator and execute the below command.
netdom computername NewComputerName /remove:OldComputerName
And here the command become, netdom computername server-001.serverlabs.com /remove:server-1.serverlabs.com
So that’s it the rename process of your domain controller is completed.
Note: During the execution of any of the command above if you may receive and error 'Element not found'. In that case make sure that you have specified the NewComputerName and OldComputerName as Fully qualified domain name.

Renaming the domain controller using GUI

As described earlier you can achieve the same graphically. Renaming a domain controller in this way may result in Active Directory replication latency, making it more difficult for clients to locate or authenticate the domain controller under its new name so the recommended method to rename the domain controller is using the command netdom. Lets see how to do this,

1. Right click My computer and select properties. Click Change settings and change button from System properties window. Now you will receive the warning message as below and click OK to continue with rename operation.
 
2. Edit the text box under computer name and you have to click OK button to apply the changes. Restart the domain controller to take effect the changes and this completes the process. 

How to configure DHCP superscope in Windows server 2008

Understanding the concept

superscope is an administrative feature of DHCP servers  that you can create and manage for configuring multiple scopes as a single administrative entity or you can say It allows you to add more than one scope (called child scopes, or member scopes) under one umbrella.  With this feature a DHCP server can:
  • Support DHCP clients on a single physical network segment (such as a single Ethernet LAN segment) where multiple logical IP networks are used. When more than one logical IP network is used on each physical subnet or network, such configurations are often called multinets.
  • Support remote DHCP clients located on the far side of DHCP and BOOTP relay agents (where the network on the far side of the relay agent uses multinets).
  • The available address pool for a currently active scope is nearly depleted and more computers need to be added to the physical network segment.
  • Clients need to be migrated to a new scope.
Always feel free to refer the MS article to get more knowledge on this which has described the roles with relevant images and tables.

Let us consider one of the scenario described above. The growth of the your company has surpassed beyond your expectations and obviously this will lead to larger network structure and networking devices. When the company has started as a small business with 100 PCs a few years ago, the 254 IP addresses a Class C subnet offered seemed more than enough for a long time. But now it's a different story. The company growth obviously leads to short of IP addresses and you need to get this resolved immediately. So what are the considerations here? Making another physical LAN(and thus another subnet)but that means you need to buy another router or another DHCP server but does that really required as it will increase the administrative tasks and expenses? Another possibility is changing to another IP address class, may be class B or class A which will provide you with more addresses but again not a very attractive one. This time you'll have to justify purchasing this address range from your ISP and then face the prospect of migrating from the existing address range (scope) to the new one. So here you can consider the creating superscope and over come the difficulties without much administrative headache and expenses.

Configuring superscope

1. Open DHCP console from administrative tools-> DHCP. Expand the server name and right click on IPV4-> New Superscope. 
 
2. Now the welcome windows will appear and click Next to start the configuration.
 3. Specify the name that you would like to assign for super scope and click Next.
4. Now it will automatically detect the presently available scopes in your DHCP server and you need to select the scope that you would make under superscope. Here I have two scopes and I want to set super scope only for one scope. Select the scope which you want and click Next.
 
5. Click Finish to create the superscope and once it is created you will notice that particular scope will be listed under the super scope that we defined.
That completes the super scope configuration on server. You can either create new scope under the new super scope by selecting the newly created super scope and select New scope. This will get you through the creation of new scopes in DHCP and completion of the same will result in adding the new scope under Super scope. Let me notify you once more thing. Once the super set is configured as above then we can say the network is multinets as described earlier.

If you wish to add any of the existing scopes to super scope, just right click the scope and you will have the option Add to super scope. Select the super scope name that you would like to add and click OKNow you will notice that the scope is listed undersuper scope that you selected.

The same way can be followed to remove a scope from Superscope. From the superscope select the scope that you would like to remove from super scope and you will have the option Remove from Superscope. Confirm the same by selecting Yes and the scope will be removed from superscope.
So that’s it the configuration of superscope and feel free to post your queries.