トップページへ
 - いらっしゃいませ♪ -
戻る
ゲストブック
 - 設定方法 -
サーバーの設定
トラブル対策
クライアント関連
エクセル関連
 - リンク集 -
Microsoft
情報サイト
ウィルス&セキュア
プログラム
 - ツール -
検索
おススメ
 - スポンサード リンク -


ドメインコントローラがクラッシュした時のアクティブディレクトリ削除方法

更新日:2005/11/24

ドメインコントローラにAdministratorでログインし、コマンドプロンプトを開きます。

  1. ntdsutil < Enter >
  2. metadata cleanup < Enter >
  3. connections < Enter >
  4. connect to server [ ドメインコントローラ名]  < Enter > ( ログインしたドメイン名を入力 )
  5. quit < Enter >
  6. select operation target < Enter >
  7. list domains < Enter >( ドメインのリストが表示されます )
  8. select domain [ 0 ] < Enter >( ドメインの番号を選択します )
  9. list sites < Enter >
  10. select site [ 0]  < Enter >
  11. list servers in site < Enter > ( サーバーのリストが表示されます )
  12. select server [ 3 ]  < Enter > ( 削除するサーバーのナンバーを入力します )
  13. quit [Enter]
  14. remove selected server  < Enter > ( 確認メッセージが表示されます )
  15. quit < Enter > を何度か入力して全て抜けます。

上記作業が無事に終わったら、

[ active directory サイトとサービス ] 

を開いてサーバを削除します。 

ドメインコントローラがまだ接続できる場合、

  1. ntdsutil < Enter >
  2. metadata cleanup < Enter >
  3. connect to server [ ドメインコントローラ名 ]  < Enter > ( 削除するドメインコントローラのドメイン名を入力 )
  4. quit < Enter > 
  5. select operation target < Enter > 
  6. list servers in site < Enter > ( サーバーのリストが表示されます )
  7. select server [ 3 ]  < Enter > ( 削除するサーバーのナンバーを入力します )
  8. quit < Enter >
  9. remove selected server < Enter >
  10. quit < Enter > を何度か入力して全て抜けます。

上記作業が無事に終わったら、

[ active directory サイトとサービス ] 

を開いてサーバを削除します。 

以上です。

情報元はこちら (英語) またはこちら(日本語)です。案外英語のほうを訳しながら作業を行ったほうが、すんなり出来たりします。

英語サイトの写し

HOW TO: Remove Data in Active Directory After an Unsuccessful Domain Controller Demotion

SUMMARY

This article describes how to remove data in Active Directory after an unsuccessful domain controller demotion.

Warning If you use the ADSI Edit snap-in, the LDP utility, or any other LDAP version 3 client, and you incorrectly modify the attributes of Active Directory objects, you can cause serious problems. These problems may require you to reinstall Microsoft Windows 2000 Server, Microsoft Windows Server 2003, Microsoft Exchange 2000 Server, Microsoft Exchange Server 2003, or both Windows and Exchange. Microsoft cannot guarantee that problems that occur if you incorrectly modify Active Directory object attributes can be solved. Modify these attributes at your own risk.

The Active Directory Installation Wizard (Dcpromo.exe) is used for promoting a server to a domain controller and for demoting a domain controller to a member server (or to a stand-alone server in a workgroup if the domain controller is the last in the domain). As part of the demotion process, the wizard removes the configuration data for the domain controller from Active Directory. This data takes the form of an NTDS Settings object that exists as a child of the server object in Active Directory Sites and Services.

The information is in the following location in Active Directory:

CN=NTDS Settings,CN=<servername>,CN=Servers,CN=<sitename>,CN=Sites,CN=Configuration,DC=<domain>...

The attributes of the NTDS Settings object include data representing how the domain controller is identified in respect to its replication partners, the naming contexts that are maintained on the machine, whether the domain controller is a global catalog server, and the default query policy. The NTDS Settings object is also a container that may have child objects that represent the domain controller's direct replication partners. This data is required for the domain controller to operate in the environment, but is retired upon demotion.

In the event that the NTDS Settings object is not removed correctly (for example, if the NTDS Settings object is not correctly removed from a demotion attempt), the administrator can use the Ntdsutil.exe utility to manually remove the NTDS Settings object. The following steps list the procedure for removing the NTDS Settings object in Active Directory for a particular domain controller. At each Ntdsutil menu, the administrator can type help for more information about the available options.

Caution The administrator must also make sure that replication has occurred since the demotion before manually removing the NTDS Settings object for any server. Using the Ntdsutil utility incorrectly may result in partial or complete loss of Active Directory functionality.

Procedure

  1. Click Start, point to Programs, point to Accessories, and then click Command Prompt.

  2. At the command prompt, type ntdsutil, and then press ENTER.

  3. Type metadata cleanup, and then press ENTER. Based on the options given, the administrator can perform the removal, but additional configuration parameters must be specified before the removal can occur.

  4. Type connections and press ENTER. This menu is used to connect to the specific server where the changes occur. If the currently logged on user does not have administrative permissions, different credentials can be supplied by specifying the credentials to use before making the connection. To do so, type set creds domain nameusernamepassword and press ENTER. For a null password, type null for the password parameter.

  5. Type connect to server servername, and then press ENTER. You should receive confirmation that the connection is successfully established. If an error occurs, verify that the domain controller being used in the connection is available and the credentials you supplied have administrative permissions on the server.

    Note If you try to connect to the same server that you want to delete, when you try to delete the server that step 15 refers to, you may receive the following error message:

    Error 2094. The DSA Object cannot be deleted0x2094

  6. Type quit, and then press ENTER. The Metadata Cleanup menu appears.

  7. Type select operation target and press ENTER.

  8. Type list domains and press ENTER. A list of domains in the forest is displayed, each with an associated number.

  9. Type select domain number and press ENTER, where number is the number associated with the domain the server you are removing is a member of. The domain you select is used to determine if the server being removed is the last domain controller of that domain.

  10. Type list sites and press ENTER. A list of sites, each with an associated number, is displayed.

  11. Type select site number and press ENTER, where number is the number associated with the site the server you are removing is a member of. You should receive a confirmation listing the site and domain you chose.

  12. Type list servers in site and press ENTER. A list of servers in the site, each with an associated number, is displayed.

  13. Type select server number, where number is the number associated with the server you want to remove. You receive a confirmation listing the selected server, its Domain Name Server (DNS) host name, and the location of the server's computer account you want to remove.

  14. Type quit and press ENTER. The Metadata Cleanup menu appears.

  15. Type remove selected server and press ENTER. You should receive confirmation that the removal completed successfully. If you receive the following error message:

    Error 8419 (0x20E3)
    The DSA object could not be found

    the NTDS Settings object may already be removed from Active Directory as the result of another administrator removing the NTDS Settings object, or replication of the successful removal of the object after running the DCPROMO utility.

    Note You may also see this error when you try to bind to the domain controller that is going to be removed. Ntdsutil has to bind to a domain controller other than the one that is going to be removed with metadata cleanup.

  16. Type quit at each menu to quit the Ntdsutil utility. You should receive confirmation that the connection disconnected successfully.

  17. Remove the cname record in the _msdcs.root domain of forest zone in DNS. Assuming that DC is going to be reinstalled and re-promoted, a new NTDS Settings object is created with a new GUID and a matching cname record in DNS. You do not want the DC's that exist to use the old cname record.

    As best practice you should delete the hostname and other DNS records. If the lease time that remains on Dynamic Host Configuration Protocol (DHCP) address assigned to offline server is exceeded then another client can obtain the IP address of the problem DC.

Now that the NTDS Settings object has been deleted, you can delete the computer account, the FRS member object, the cname (or Alias) record in the _msdcs container, the A (or Host) record in DNS, the trustDomain object for a deleted child domain, and the domain controller.

  1. Use ADSIEdit to delete the computer account. To do this, follow these steps:

    1. Start ADSIEdit.

    2. Expand the Domain NC container.

    3. Expand DC=Your Domain, DC=COM, PRI, LOCAL, NET.

    4. Expand OU=Domain Controllers.

    5. Right-click CN=domain controller name, and then click Delete.

    If you receive the "DSA object cannot be deleted" error when you try to delete the object, change the UserAccountControl value. To change the UserAccountControl value, right-click the domain controller in ADSIEdit, and then click Properties. Under Select a property to view, click UserAccountControl. Click Clear, change the value to 4096, and then click Set. You can now delete the object.

    Note The FRS subscriber object is deleted when the computer object is deleted because it is a child of the computer account.

  2. Use ADSIEdit to delete the FRS member object. To do this, follow these steps:

    1. Start ADSIEdit.

    2. Expand the Domain NC container.

    3. Expand DC=Your Domain, DC=COM, PRI, LOCAL, NET.

    4. Expand CN=System.

    5. Expand CN=File Replication Service.

    6. Expand CN=Domain System Volume (SYSVOL share).

    7. Right-click the domain controller you are removing, and then click Delete.

  3. In the DNS console, use the DNS MMC to delete the A record in DNS. The A record is also known as the Host record. To delete the A record, right-click the A record, and then click Delete. Also delete the cname (also known as the Alias) record in the _msdcs container. To do so, expand the _msdcs container, right-click the cname, and then click Delete.

    Important If this was a DNS server, remove the reference to this DC under the Name Servers tab. To do this, in the DNS console, click the domain name under Forward Lookup Zones, and then remove this server from the Name Servers tab.

    Note If you have reverse lookup zones, also remove the server from these zones.

  4. If the deleted computer was the last domain controller in a child domain and the child domain was also deleted, use ADSIEdit to delete the trustDomain object for the child. To do this, follow these steps:

    1. Start ADSIEdit.

    2. Expand the Domain NC container.

    3. Expand DC=Your Domain, DC=COM, PRI, LOCAL, NET.

    4. Expand CN=System.

    5. Right-click the Trust Domain object, and then click Delete.

  5. Use Active Directory Sites and Services to remove the domain controller. To do this, follow these steps:

    1. Start Active Directory Sites and Services.

    2. Expand Sites.

    3. Expand the server's site. The default site is Default-First-Site-Name.

    4. Expand Server.

    5. Right-click the domain controller, and then click Delete.

日本語サイトの写し

ドメイン コントローラの降格に失敗した後、Active Directory のデータを削除する方法

概要

この資料では、ドメイン コントローラの降格に失敗した後で、Active Directory のデータを削除する方法を説明します。

詳細

DCPROMO (Dcpromo.exe) ユーティリティは、サーバーのドメイン コントローラへの昇格と、ドメイン コントローラのメンバ サーバー (または、ドメイン内の最後のドメイン コントローラの場合には、ワークグループのスタンドアロン サーバー) への降格に使用します。降格処理の一部として、DCPROMO ユーティリティは、Active Directory からドメイン コントローラの構成データを削除します。このデータは、[Active Directory サイトとサービス マネージャ] のサーバー オブジェクトの子オブジェクトとして存在する、"NTDS 設定" オブジェクトの形式を取ります。

この情報は、Active Directory の以下の場所にあります:

CN=NTDS Settings,CN=<サーバー名>,CN=Servers,CN=<サイト名>,CN=Sites,CN=Configuration,DC=<ドメイン>...

NTDS 設定オブジェクトの属性は、ドメイン コントローラがその複製パートナーに関してどのように識別されるか、コンピュータに保持されている名前付けコンテキスト、ドメイン コントローラがグローバル カタログ サーバーかどうか、およびデフォルトのクエリ ポリシーを表すデータを含んでいます。NTDS 設定オブジェクトは、ドメイン コントローラの直接の複製パートナーを表す子オブジェクトを持つコンテナである場合もあります。このデータは、ドメイン コントローラがその環境で動作するために必要ですが、降格の際に破棄されます。

NTDS 設定オブジェクトが正しく削除されない (たとえば、降格しようとしたときに NTDS 設定オブジェクトが正しく削除されない) 場合、管理者は Ntdsutil.EXE ユーティリティを使用して、NTDS 設定オブジェクトを手動で削除することができます。以下の手順は、Active Directory で特定のドメイン コントローラの NTDS 設定オブジェクトを削除する手順を示しています。各 NTDSUTIL メニューで、管理者は、help を入力して使用できるオプションについての詳細情報を取得することができます。

注意 : 管理者は、いかなるサーバーに対しても、NTDS 設定オブジェクトを手動で削除する前に、降格してから複製が発生したこともチェックしてください。NTDSUTIL ユーティリティを誤って使用すると、Active Directory の機能が部分的にまたは完全に失われる可能性があります。

  1. [スタート] ボタンをクリックし、[プログラム]、[アクセサリ] の順にポイントし、[コマンド プロンプト] をクリックします。

  2. コマンド プロンプトで ntdsutil と入力します。

  3. metadata cleanup と入力して Enter キーを押します。指定したオプションに基づいて、管理者は削除を実行することができますが、削除が発生する前に追加の構成パラメータを指定する必要があります。

  4. connections と入力して Enter キーを押します。このメニューは、変更が発生する特定のサーバーへの接続に使用します。現在ログオンしているユーザーが管理者権限を持っていない場合は、接続する前に使用する資格情報を指定することによって、代わりの資格情報を使用できます。この操作を実行するには、set credsドメイン名ユーザー名パスワード と入力して、Enter キーを押します。NULL パスワードには、パスワード パラメータに null と入力します。

  5. connect to serverサーバー名 と入力して Enter キーを押します。接続が正常に確立されたという確認メッセージが表示されるはずです。エラーが発生した場合は、接続に使用されているドメイン コントローラが利用可能であり、指定した資格情報にサーバーの管理者権限が含まれていることを確認します。

    注 : 削除するサーバーに接続しようとした場合、手順 15. でサーバーを削除しようとすると、次のエラー メッセージが表示される場合があります。

    Error 2094. DSA オブジェクトは削除できません。0x2094

  6. quit と入力して Enter キーを押します。[Metadata Cleanup] メニューが表示されます。

  7. select operation target と入力して Enter キーを押します。

  8. list domains と入力して Enter キーを押します。フォレストのドメインのリストが、それぞれの関連付けられた番号とともに表示されます。

  9. select domain 番号 と入力して Enter キーを押します。ここで、番号は、削除しようとしているサーバーがメンバであるドメインに関連付けられた番号です。選択したドメインは、削除されるサーバーがそのドメインの中で最後のドメイン コントローラかどうかを判定するために使用されます。

  10. list sites と入力して Enter キーを押します。サイトのリストが、それぞれの関連付けられた番号とともに表示されます。

  11. select site番号 と入力して Enter キーを押します。ここで、番号は削除しようとしているサーバーがメンバであるサイトに関連付けられた番号です。選択したサイトとドメインをリストした確認メッセージが表示されます。

  12. list servers in site と入力して Enterキーを押します。サイトのサーバーのリストが、それぞれの関連付けられた番号とともに表示されます。

  13. select server 番号 と入力します。ここで、番号は、削除したいサーバーに関連付けられた番号です。選択したサーバー、そのドメイン ネーム サーバー (DNS) のホスト名、および削除したいサーバーのコンピュータ アカウントの場所をリストした確認メッセージが表示されます。

  14. quit と入力して Enter キーを押します。[Metadata Cleanup] メニューが表示されます。

  15. remove selected server と入力して Enter キーを押します。削除が正常に完了したという確認メッセージが表示されます。以下のエラー メッセージが表示される場合は、

    Error 8419 (0x20E3)
    DSA オブジェクトが見つかりませんでした。

    別の管理者による NTDS 設定オブジェクトの削除によって、または DCPROMO ユーティリティ実行後にオブジェクトが正常に削除され、それが複製された結果、NTDS 設定オブジェクトが Active Directory から既に削除されていることがあります。

  16. 各メニューで quit と入力して NTDSUTIL ユーティリティを終了します。接続が正常に切断されたという確認メッセージが表示されます。

  17. DNSの _msdcs.フォレストのルート ドメインゾーンにある cname レコードを削除します。 DC の再インストールと再昇格を行う場合、新しい NTDS 設定オブジェクトが、新しいグローバル一意識別子 (GUID) と、DNS の中の一致する cname レコードを使って作成されます。 DC が、古い cname レコードを使用して存在することは望ましくありません。 最善の方法として、ホスト名と他の DNS レコードを削除する必要があります。 オフライン サーバーに割り当てられた DHCP (Dynamic Host Configuration Protocol) アドレスに設定されているリース時間が制限を超えた場合、他のクライアントが、問題の DC の IP アドレスを取得できます。

注 : 応答がないコンピュータを削除する場合、次の項目の削除を検討します。

  1. NTDS 設定オブジェクト (この資料で説明した、選択したサーバーを削除するプロセスにより実行が可能)

  2. ドメイン nc 内のコンピュータ アカウント

  3. コンピュータ アカウントの子である FRS サブスクライバ オブジェクト

  4. cn=file replication service、cn=system....の FRS メンバ オブジェクト

  5. _msdcs コンテナの cname レコード

  6. DNS の A レコード

  7. このコンピュータが、子ドメインの リスト dc であり、"選択したドメインを削除する" が選択されている場合、その子の信頼関係オブジェクトも削除する。

<戻る>


< トップへ >