Showing posts with label Active Directory. Show all posts
Showing posts with label Active Directory. Show all posts

                                                             Metadata cleanup on windows 2008/2012



Let us take windows 2003 and windows 2008 DC’s as an example, you have migrated from 2003 to windows 2008 and moved all the FSMO roles to windows 2008 server. Now you have started demote the Windows 2003 domain controller and you ran into issues.

Now you have decided to go with Force removal of windows 2003 and removed the ADDS forcefully. (using dcpromo /forceremoval). Is this finishes your job ??

No! this is where actual job starts, you have removed Windows 2003 DC, but its references will not be removed from Active Directory database on your New domain controller (Windows 2008 DC).


You need to undergo metadata cleanup to remove all the instances of old DC from Active Directory.

Step-by-Step procedure for Metadata cleanup

Please Note:  Before starting please make sure your account is in Enterprise Admins group

  • Open a command prompt, type ntdsutil and press enter.
  • At the above ntdsutil prompt type metadata cleanup and press enter.
  • Now at metadata cleanup prompt type connections and press enter.
  • Now at the Server Connections prompt, type connect to server Test2.test.testdomain.com
  • At the Server Connections prompt, type quit and Enter.
  • At the Metadata Cleanup prompt, type select operation target and press Enter.
  • At the Selected  Operations Target prompt, type list domains and press Enter. This list all the domains in the forest are listed with a number associated to each.

  • At the Select Operations Target prompt, type select domain 0, where number “0” is the failed domain controller, and press Enter.

  • At the Select Operations Target prompt, type list sites and press Enter. This list all the sites in the forest are listed with a number assigned to each.

  • At the Select Operations Target prompt, type select site 0, where number “0” is the site containing the 2003 domain controller, and press Enter.

  • At the Select Operations Target prompt, type list servers in site and press Enter.

  • At the Select Operations Target prompt, type select server 0, where number “0” is the 2003 domain controller, and press Enter.
  • At the Select Operations Target prompt, type quit and press Enter.
  • At the Metadata Cleanup prompt, type remove selected server and press Enter.
  • You will get a warning message. Click Yes to confirm removal of the server

  • Once completed Type quit, Press enter and Type Quit and press enter, until you reach back to root drive.


Done, you have now completed the meta data cleanup and removed all the traces of your old domain controller.




                             How to Transfer FSMO Roles

 Prerequisites:

  • make sure the user your logged in as a domin administrator that is a schema dministrator

 Transferring the RID Master, PDC Emulator, and Infrastructure Masters via GUI

To Transfer the Domain-Specific RID Master, PDC Emulator, and Infrastructure Master FSMO Roles:
  1. Open the Active Directory Users and Computers snap-in from the Administrative Tools folder.
  2. If you are NOT logged onto the target domain controller, in the snap-in, right-click the icon next to
    Active Directory Users and Computers and press Connect to Domain Controller.
  3. Select the domain controller that will be the new role holder, the target, and press OK.
  4. Right-click the Active Directory Users and Computers icon again and press Operation Masters.
  5. Select the appropriate tab for the role you wish to transfer and press the Change button.
  6. Press OK to confirm the change.
  7. Press OK all the way out.
Transferring the Domain Naming Master via GUI

To Transfer the Domain Naming Master Role:
  1. Open the Active Directory Domains and Trusts snap-in from the Administrative Tools folder.
  2. If you are NOT logged onto the target domain controller, in the snap-in, right-click the icon next to
    Active Directory Domains and Trusts and press Connect to Domain Controller.
  3. Select the domain controller that will be the new role holder and press OK.
  4. Right-click the Active Directory Domains and Trusts icon again and press Operation Masters.
  5. Press the Change button.
  6. Press OK to confirm the change.
  7. Press OK all the way out.
Transferring the Schema Master via GUI

To Transfer the Schema Master Role:
  1. Register the Schmmgmt.dll library by pressing Start > RUN and typing:
regsvr32 schmmgmt.dll
  1. Press OK. You should receive a success confirmation.
  2. From the Run command open an MMC Console by typing MMC.
  3. On the Console menu, press Add/Remove Snap-in.
  4. Press Add. Select Active Directory Schema.
  5. Press Add and press Close. Press OK.
  6. If you are NOT logged onto the target domain controller, in the snap-in, right-click the Active Directory Schema icon in the Console Root and press Change Domain Controller.
  7. Press Specify …. and type the name of the new role holder. Press OK.
  8. Right-click right-click the Active Directory Schema icon again and press Operation Masters.
  9. Press the Change button.
  10. Press OK all the way out.
Transferring the FSMO Roles via Ntdsutil

To transfer the FSMO roles from the Ntdsutil command: 
Note: Using the Ntdsutil utility incorrectly may result in partial or complete loss of Active Directory functionality.
  1. On any domain controller, click Start, click Run, type Ntdsutil in the Open box, and then click OK.
Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp.
C:WINDOWS>ntdsutil ntdsutil:
  1. Type roles, and then press ENTER.
ntdsutil: roles fsmo maintenance:
Note: To see a list of available commands at any of the prompts in the Ntdsutil tool, type ?, and then press ENTER.
  1. Type connections, and then press ENTER.
fsmo maintenance: connections server connections:
  1. Type connect to server , where is the name of the server you want to use, and then press ENTER.
server connections: connect to server server100 Binding to server100 ...
Connected to server100 using credentials of locally logged on user. server connections:
  1. At the server connections: prompt, type q, and then press ENTER again.
server connections: q fsmo maintenance:
  1. Type transfer . where is the role you want to transfer.
Options are:

Transfer domain naming master 
Transfer infrastructure master 
Transfer PDC 
Transfer RID master 
Transfer schema master
  1. You then see a warning popup asking if you want to perform the transfer. Select Yes to continue.
  2. Then after you transfer the roles, type q and press ENTER until you quit Ntdsutil.exe.
  3. Restart the server and make sure you update your backup.

Active Directory Error: "The module "schmmgmt.dll" loaded but the call to DllRegisterServer failed with error code 0x80040201"

 

 Today i am trying to trasfer the FSMO role to one of my other test domain controller. All the roles trasfered successfully except Schema Master role.

When i am trying to register the Active Directory Schema Snap-in, i got the following error "The module "schmmgmt.dll" loaded but the call to DllRegisterServer failed with error code 0x80040201"



What is this error and why it is generated ??

This is not a critical error, it is due to User Account Control (UAC) limiting to initiate the command successfully.

We  need to run the command from an elevated command prompt to register the Snap-in successfully.


Here the User Account Control (UAC) might be limited our capability even we logged on using an account that is a member of the Schema Admins group. we need to login or start an elevated command prompt using an account that is a member of the Schema Admins group and the command completes successfully.


                             Journal Wrap Errors and Sysvol replication issues ( Event ID:    13568)

Many administrators might faced this issue that suddenly your Sysvol replication might stop and journal wrap errors will be logged in your eventvwr.

=====================================
Event Type:    Error
Event Source:    NtFrs
Event Category:    None
Event ID:    13568
Date:        12/7/2012
Time:        2:56:41 PM
User:        N/A
Computer:    YAMATO
Description:
The File Replication Service has detected that the replica set "DOMAIN SYSTEM VOLUME (SYSVOL SHARE)" is in JRNL_WRAP_ERROR.
 ===================================
How to fix this now, this can be fixed by Enabling Journal Wrap Automatic Restore, when you do this it will delete your sysvol share which is in error state and creates the new one and re-sync's the data with the other domain controller in the network.
Let us see hoe to enable journal wrap automatic restore, it is a very simple process which needs a registry key change.

  • Open Regedit and expand " HKLM\System\CurrentControlSet\Services\NtFrs\Parameters"  
  • Change value for "Enable Journal Wrap Automatic Restore" from 0 to 1. If the DWORD Value does not exist, create a new one .
  •     Stop and start the NTFRS Service.
  •     Now go back to event viewer and keep an eye on FRS events.
    • when the recovery process start you will see event id: 13553
    • When the source server re-creates sysvol folder and it i will ready to accept the data from peer domain controller you will see evend id: 13554
    • Once the Sysvol is transfered and shared successfully you will see the event :13516.
  • The issue will be resolved now, the sysvol will starts replication with out any issue.
  • Come back to registry now and revert back the "Enable Journal Wrap Automatic Restore" value to 0.


    :-) journal Wrap error will be stopped and Sysvol replication will be started