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

Sunday, November 29, 2015

Install and Configure AD LDS

DNS Requirements

Another difference between the Active Directory and AD LDS is that the Active Directory is totally dependent on DNS servers. Without DNS, the Active Directory cannot function. AD LDS on the other hand does not require DNS.
In some ways this makes sense. The Active Directory uses DNS as a mechanism for maintaining the domain hierarchy. There is no domain hierarchy associated with AD LDS, so DNS is unnecessary.

Installing the Active Directory Lightweight Directory Service

Installing AD LDS is actually a very simple process. To do so, open the Server Manager, and then click on the Add Roles link. When you do, Windows will launch the Add Roles Wizard. Click Next to bypass the wizard’s welcome screen and you will be taken to a screen that displays all of the available server roles.
Select the Active Directory Lightweight Directory Services check box, as shown in Figure A.

Figure A: Active Directory Lightweight Directory Service.
Click Next, and you will see an introductory screen that explains what the AD LDS is and what it does. Click Next and Windows will display a confirmation message indicating that the AD LDS server role is about to be installed. Click theInstall button to begin the installation process.
The entire installation process usually only takes about 30 seconds to complete. After the server role finishes installing, click the Close button to complete the installation process. Unlike some of the Windows 2008 server roles, installing the AD LDS role does not require you to reboot the server.

When the Active Directory Lightweight Directory Services Setup Wizard starts, click Next to bypass the wizard’s Welcome screen. At this point, you will see a screen similar to the one shown in Figure 1, asking if you want to create a unique instance or a replica of an existing instance. Since we are setting up a new instance, choose the A Unique Instance option. I will be discussing replica instances in Part 4.

Figure 1: Tell Windows that you want to create a unique instance.
Click Next and you will be promoted to provide a name and an optional description for the instance that you are creating, as shown in Figure 2. For the sake of demonstration I will be using the default instance name (which is Instance1). In the real world however, I recommend using a more descriptive name.

Figure 2: You must provide a name and an optional description for the instance that you are creating.
When you click Next, you will be taken to the screen shown in Figure 3. As you can see in the figure, Windows defaults to using port number 50,000 for LDAP communications with the new instance, and port number 50,001 for SSL encrypted LDAP communications. You can change these port numbers to anything that you want (including 389 and 636) so long as those port numbers are not already in use on the server and you do not plan to make the server a domain controller.

Figure 3: Windows defaults to using ports 50,000 and 50,001 for use with the new AD LDS instance.
Click Next, and you will be taken to the screen shown in Figure 4. As you can see in the figure, this screen asks you if you want to create an application directory partition. The application directory partition is essentially a directory enabled repository that you can use for storing application data.

Figure 4: You will almost always want to go ahead and create an application directory partition.
Since the whole point of creating an AD LDS instance is to allow for application data to be stored in a directory partition, you will almost always choose the option that creates a new application directory partition. There are really only two situations in which you would not want to create an application directory partition. You would obviously not want to create an application directory partition if you wanted to manually create the partition later on. The other situation in which you wouldn’t want to create an application directory partition would be when you plan to install an application that automatically creates the necessary partition itself.
As I explained earlier, you must provide a name for the application directory partition. You must enter this name as a distinguished name. According to TechNet “AD LDS supports both X.500 style and Domain Name System (DNS) - style distinguished names for top level directory partitions”. Having said that, I have to tell you that I have never seen a DNS style distinguished name used for an application directory partition in the real world. If you look back at Figure 4, you can see that even Microsoft seems to give preference to X.500 style distinguished names because the example distinguished name shown in the screen capture is in X.500 style format.
Regardless of the type of distinguished name that you choose to enter, it is important to get the name right on the first try. Otherwise, Windows will allow you to get all the way to the end of the wizard before giving you an error.
After you have provided a distinguished name for the partition that you are creating, click Next and you will be prompted to specify a path beneath which to store the data files and the data recovery files that are to be used with the AD LDS instance. This portion of the wizard, which you can see in Figure 5, should seem familiar to anyone who has ever set up an Active Directory domain controller.

Figure 5: You must provide a path to be used by the AD LDS database.
In an Active Directory environment, it is usually acceptable to use the default path. When it comes to AD LDS however, you may want to redirect the data files and the data recovery files to a high speed or fault tolerant array, depending on how extensively the AD LDS instance will be used.
After providing the necessary paths, click Next and you will be prompted to provide a service account for use with the AD LDS instance. You can use a network service account, or you can provide a domain service account. Of course servers that host AD LDS instances are not always domain members, so in some cases you may be forced to use network service accounts.
Click Next, and you will be prompted to specify the name of a user or a group who should have administrative access to the partition that you are creating. By default, Windows will use the account that you are logged on with when you create the account, as shown in Figure 6, but you are usually going to be better off manually specifying an administrative group.

Figure 6: Specify the name of the user or group that should have administrative control over the AD LDS instance.
After clicking Next, you should see a screen asking you which LDIF files you want to import. The LDIF files that you select will establish the schema for the instance. You are free to select any of the LDIF files or any combination of the files. The documentation for the application that will be making use of the AD LDS instance should provide you with guidance as to which LDIF files to import.
When you click Next, you should see a summary of the options that you have selected throughout the wizard. Assuming that everything appears to be correct, click Next and the AD LDS instance will be created.  When the process completes, click Finish to close the wizard.

Deploying the Active Directory Lightweight Directory Service Role

Before you can create a replica of your AD LDS instance, you must install the Active Directory Lightweight Directory Service Role onto the server that will host the replica that you are creating. The procedure for doing so is similar to the procedure that you used when you created your first AD LDS instance, but I will go ahead and provide you with a brief set of instructions so that you don’t have to go back and look at the previous article.
To install the AD LDS role, open the Server Manager and then select the Roles container and click the Add Roles link. When you do, Windows will launch the Add Roles Wizard. Click Next to bypass the wizard’s Welcome screen and you will be taken to a screen that asks you which roles you would like to install. Select Active Directory Lightweight Directory Services check box.
At this point, you should see a dialog box similar to the one shown in Figure A, telling you that some additional role services are required. Simply click the Add Required Role Services button to install the required role services.

Figure A: Click Add Required Features and then click Next.
Click Next, and the wizard will display a screen introducing you to the Active Directory Lightweight Directory Services. Go ahead and click Next to bypass this screen. You should now see a confirmation screen which asks you to verify that you do indeed want to install the AD LDS role. Assuming that the information displayed on the confirmation screen is correct, go ahead and click Install. Windows will now install the AD LDS role service. When process completes, click Close.

Creating the Replica

So far we have installed the AD LDS role, but we have not yet created a replica of our previously existing AD LDS instance. To begin creating the desired replica, open the Active Directory Lightweight Directory Services Console, which is located on the Administrative Tools menu. When the console opens, Windows will launch the Active Directory Lightweight Directory Services Setup Wizard.
Click Next to bypass the wizard’s welcome screen. You should now see a screen similar to the one shown in Figure B, asking you if you want to create a unique instance or a replica of an existing instance. Select the A Replica of an Existing Instance option and click Next.

Figure B: Select the Replica of an Existing Instance option and click Next.
At this point, you will be taken to the screen shown in Figure C. As you can see in the figure, the wizard asks you for an instance name. The name that you enter should match the name of the instance that you want to replicate. Depending on what you called your instance, this dialog box may be filled in automatically.

Figure C: Specify the name of the instance that you want to replicate, and then click Next.
Click Next and you will be taken to the screen shown in Figure D, which asks you to specify the port numbers that the instance will use. If possible, you should try to use the same port numbers as are being used by the original copy of the instance. Of course this may be impossible if the server hosting the replica has other instances installed on it, or if the server is also functioning as a domain controller.

Figure D: You must tell Windows which ports you want to use with the replica that you are creating.
The next screen that you will encounter tells you that you must join a configuration set. A configuration set is nothing more than a group of instances that all share a common configuration and schema. In this case, the configuration set will be composed of the original instance and the replica that you are creating. Therefore, all you have to do is to provide the full DNS name of the server hosting the instance that you will be replicating, along with the LDAP port number that the instance is using. You can see an example of this in Figure E.

Figure E: You must provide the FQDN of the server hosting the instance that you are replicating.
The next screen that you will encounter asks you to provide a set of credentials that have administrative permissions for the configuration set. Just enter a set of administrative credentials as shown in Figure F, and click Next.

Figure F: You must provide a set of administrative credentials for the configuration set.
At this point, you should see a screen similar to the one shown in Figure G. As you can see in the figure, you must select the check box corresponding to the partitions that you want to replicate.

Figure G: Select the check boxes corresponding to the partitions that you want to replicate.
Click Next and you will be taken to a screen which asks you for the path in which the data files and data recovery files should be stored. You can click Next to accept the defaults (which are shown in Figure H) or you can provide alternate paths.

Figure H: You must tell Windows where the AD LDS data should be stored.
You must now provide the wizard with a service account that it can use for AD LDS operations. As you can see in Figure I, you can either use a network service account or you can specify a specific account.

Figure I: You must provide the wizard with a service account to be used for AD LDS operations.
Finally, you will have to grant either a user or group administrative privileges for the AD LDS instance. As you can see in Figure J, the wizard allows you to either use the current user or to manually specify a specific user or group name.

Figure J: You must delegate administrative privileges for the instance.
When you click Next, Windows will display a summary screen containing all of the configuration options that you have entered, as shown in Figure K. Take the time to read over this summary screen to make sure that everything is correct. Assuming that all is well, click Next and Windows will begin configuring the AD LDS instance. When the process completes, click Close to close the wizard.

Figure K: Take the time to read the summary screen to verify that the server will be correctly configured.

That isn’t to say that AD LDS does not make use of a third partition like the Active Directory does. It’s just that AD LDS uses an Application Directory Partition rather than a domain partition.
If you think back to the article in which I first showed you how to deploy AD LDS, you will recall that there was a screen which asked you whether you wanted the wizard to create an application directory partition or if the application that would be making use of the AD LDS instance that you are creating would create the partition instead. You can see what that screen looks like in Figure A.

Figure A: An AD LDS instance makes use of an application directory partition.
An application directory partition works similarly to a domain partition except that rather than store domain specific information, an application directory partition stores the data that is used by the application for which you are creating the AD LDS instance.

Configuration Sets

As you will recall, the previous article in this series demonstrated a technique for creating a replica of an AD LDS instance. What I didn’t mention though was that when you create a replica of an existing instance, you also create a logical structure called a configuration set. Simply put, a configuration set consists of two or more replicas of the same AD LDS instance.
The easiest way that I can think of to explain a configuration set is to tell you to think of a configuration set like an Active Directory domain. Earlier I said that you could think of an AD LDS instance as being similar to a domain controller. As I’m sure you know, most Active Directory domains contain multiple domain controllers. In the same way, an AD LDS configuration set contains multiple AD LDS instances.
The analogy goes a little bit further than that though. Like an Active Directory domain, the instances within a configuration set all share a common schema directory partition and a common configuration directory partition.
AD LDS also uses a similar multi master replication model to what an Active Directory domain uses. Updates can be made to a partition on any AD LDS instance, and those changes will be automatically replicated to all of the other instances within the configuration set.

As strange as it may sound, the tool that you will use to create an AD LDS site is the Active Directory Sites and Services console. Even though this utility is primarily used for managing Active Directory environments, it can be used to manage Ad LDS sites almost as easily.
Begin the process by opening the Active Directory Sites and Services console. When the console opens, right click on the Active Directory Sites and Services container and select the Change Domain Controller command from the resulting shortcut menu. If you are performing this action from a domain controller then you will see a screen similar to the one that is shown in Figure A, which lists all of the known domain controllers. If you look carefully though, you will notice that the Change To section of the dialog box contains an option labeled This Domain Controller or AD LDS Instance.

Figure A: You will have to use the Active Directory Sites and Services console to create an AD LDS site structure.
At this point, you must select the This Domain Controller or AD LDS Instance option. You will notice that when you do this, nothing changes. The dialog box still displays the same list of domain controllers. However, if you look at the figure above, you will notice that just above the first domain controller is a line that says Type a Directory Server Name [:port] Here. You must click on this line and then type the Fully Qualified Domain Name (FQDN) of your AD LDS server followed by a colon and the port number that has been assigned to the instance that you want to connect to.
As you may recall, when you first created the instance, you were required to provide a name for the instance as well as an LDAP port number and an SSL port number, as shown in Figure B.

Figure B: The AD LDS Setup Wizard required you to assign a port number to the instance.
If you used the default settings then the first instance is named Instance1 and is assigned port number 50000, as shown above. If you create additional instances (and use the default settings) then you can figure out the port number by adding two to the port number for each instance that you create. For example, Instance2 would use a default port number of 50002 and Instance 3 would use 50004.
For right now, we must type the server’s fully qualified domain name (not the instance name), and the port number that has been assigned to the instance that you want to connect to. For example, I installed AD LDS onto a domain controller named Lab-DC2 in a domain named lab.com. Therefore, if I wanted to connect to the default instance (using the default port number), I would type:
Lab-dc2.lab.com:50000
When you click OK, you will see a message similar to the one shown in Figure C, asking you if you want to use a different forest rooted domain. Even though we aren’t technically connecting to an Active Directory domain, go ahead and click Yes. You will now be connected to the AD LDS instance.

Figure C: You must click Yes to connect to the AD LDS instance.

Creating AD LDS Sites

Now that we have connected to the AD LDS instance, it is time to define a site topology. Generally speaking, the site structure that you create should mimic your network topology, with each site link corresponding to a WAN link. If there is high speed (LAN) connectivity between two AD LDS instances then those instances should be placed within a common site.
To create a site, just right click on the Sites container in the Active Directory Sites and Services console, and choose the New Site command from the resulting shortcut menu. When you do, you will be prompted to specify a name for the site that you are creating. You will also be prompted to select a site link for the site to use to connect to other sites, as shown in Figure D. Microsoft provides you with a default site link (which is named DEFAULTSITELINK), but you have the option of creating additional site links if you choose.

Figure D: You must provide Windows with a site name and choose a site link to associate with the site.
When you click OK, the site will be created. However, you will see a message telling you that you have some more work to do. As you can see in Figure E, you must still link the site to some other sites, and associate one or more subnets with the site. The dialog box also tells you that you must install or move one or more domain controllers into the site. However, this message is incorrect. The message is displayed because AD LDS assumes that you are working in an Active Directory environment. Since we are working with AD LDS, domain controllers are not technically required. You must however, move your AD LDS instances into sites.

Figure E: You still have some configuration work to do.

Assigning Subnets

As I explained earlier, each Active Directory site should correspond to a different subnet. To provide AD LDS with the subnet information for you network, expand the Sites container and then right click on the Subnets container and choose the New Subnet option from the shortcut menu.
You must enter a subnet prefix, as shown in Figure F. The Prefix that you enter will also be listed as the Prefix Name in Active Directory Domain Services, but in reality it will be limited to the Configuration Set. Finally, you must choose a site to associate with the IP address prefix, as shown in the figure below.

Figure F: You must assign an IP address prefix to each site.

Moving a Server to a Different Site

By default, each of your AD LDS servers are placed into a site named Default-First-Site-Name. If you are going to be using a multi-site configuration then you will need to move the servers from the default site and into the appropriate site. For example, you saw in the previous figure that I named my sites after various American cities, which represent the geographic locations of the AD LDS servers. Therefore, the next step would be to move my AD LDS instances from the default location and into the site that corresponds with the appropriate city.
To move a server, simply expand the site container and select the Servers container beneath it. Right click on the listing for the server and choose the Move command from the shortcut menu. When you do, you will see a dialog box asking you which site you want to move the instance into, as shown in Figure G. Make your selection and click OK to move the instance.

Figure G: Select the site that you want to move the instance into, and click OK.

Defining Site Link Objects

Creating a site link object is simple. To do so, open the Active Directory Sites and Services console and then right click on the Active Directory Sites and Services container and select the Change Domain Controller command from the resulting shortcut menu. When prompted, specify the name and the port number of your AD LDS server instance.
Once you have established connectivity to an AD LDS instance, navigate through the console tree to Active Directory Sites and Services | Sites | Inter-Site Transports | IP. Upon selecting the IP container, you should see the default IP site link (DEAULTIPSITELINK), as shown in Figure A.

Figure A: Navigate through the console tree to Active Directory Sites and Services | Sites | Inter-Site Transports | IP.
If you want to create a new site link, then right click on the IP container and choose the New Site Link command from the shortcut menu. When you do, you will be prompted to provide a name for the site link that you are creating. Over time it is possible that you may accumulate several different site links as your organization grows. That being the case, I recommend using a descriptive name for your site link.
As you define the site link, you will be asked to specify which sites should be included within the site link, as shown in Figure B. Remember that a site link should mimic a WAN connection, and should therefore serve as a logical link between two sites.

Figure B: You must provide a name for the new site link and tell Windows which sites the site link joins.
When you click OK, the new site link will be created. By default this new site link uses a cost of 100 default replication interval of 180. However, site links are fully customizable.

Managing Inter-site Replication

Now that you have created a site link connector, I want to show you how inter-site replication works in an AD LDS environment. As I mentioned before, replication occurs over the site link every 180 minutes by default. However, you can create a custom replication schedule that better meets your needs.
To do so, right click on the site link that you just created and choose the Properties command from the resulting shortcut menu. Upon doing so, Windows will display the properties sheet for the site link. As you can see in Figure C, the properties sheet's General tab provides an option for changing the replication frequency.

Figure C: You have the option of changing the replication frequency to meet your needs.
As you look at the figure above, you will notice that the properties sheet also contains a Change Schedule button. When you click this button, Windows displays a calendar view of the replication schedule, as shown in Figure D. You can use this calendar view to control when replication does and does not occur. For example, if you experience a lot of WAN congestion during peak hours, then you might configure the replication schedule so that sites only replicate during off peak hours.

Figure D: Windows Server 2008 allows you to define a custom replication schedule.
As you look at the calendar view shown in the figure above, one of the things that you will notice is that the calendar view only allows you to enable or disable replication during a particular time of the day. The calendar does not give you the option of changing the replication frequency. The replication frequency is controlled on a global basis (for the site link) on the site link’s properties sheet. As such, no option exists for configuring a site to replicate more frequently during some parts of the day and less frequently during other parts of the day.

Disaster Recovery Considerations

Throughout this article series, I have discussed the Active Directory Lightweight Directory Services from an introductory standpoint. If you have made it this far into the series though, I am guessing that you are eventually planning on deploying at least one real world AD LDS instance if you have not already. As such, I wanted to conclude the series by talking about some disaster recovery considerations.
The first thing that I want to explain is that although I have spent the last couple of articles talking about replicating the Active Directory Lightweight Directory Services instances that you have created, creating replicas is no substitute for creating backups.
Suppose for a moment that you had several replicas of an AD LDS instance. If one of those replicas experienced a hard drive failure then you wouldn't have any loss of functionality because the other replicas remain in a functional state. However, suppose that some bad data was accidentally added to one of your AD LDS replicas. That bad data would be replicated to all of the other replicas. The only way to revert the data to its previous state would be to restore a backup.
Backup planning for the Active Directory Lightweight Directory Services is actually very easy. You can backup an AD LDS instance in exactly the same way as you would backup a domain controller. Virtually any backup application can be used to back up an AD LDS instance, including Windows Server Backup.
Most of your backup planning efforts should go into capacity planning and determining the appropriate backup frequency. Depending on how heavily an AD LDS instance is used (and depending what it is used for), the instance can accumulate data very quickly. As such, you may determine that performing a traditional nightly backup of the instance is too risky because if a failure were to occur, you could potentially lose any data that has accumulated since the time that the last backup was made.
If the potential for data loss is of concern to you then you might consider implementing a Continuous Data Protection solution, such as Microsoft’s System Center Data Protection Manager. System Center Data Protection Manager can be configured to backup data every fifteen minutes rather than once every twenty four hours like a traditional nightly backup does. Whatever backup solution you choose though, you must ensure that it can accommodate the ever growing size of your AD LDS instance.

Saturday, November 28, 2015

Identify or transfer the schema master role

  1. Open the Active Directory Schema snap-in and connect to the AD LDS instance in which you want to deactivate classes or attributes. For more information, see Use the Active Directory Schema Snap-in to Administer AD LDS Instances.
  2. In the console tree, right-click Active Directory Schema, and then click Operations Master.
  3. In the Change Schema Master dialog box, do one of the following:
    • To identify the current schema master, note the AD LDS instance that is listed in Current schema master.
    • To transfer the schema master role to the currently targeted AD LDS instance, click Change.

Deactivate a schema object class or attribute

  1. Open the Active Directory Schema snap-in, and connect to the AD LDS instance in which you want to deactivate classes or attributes. For more information, see Use the Active Directory Schema Snap-in to Administer AD LDS Instances.
  2. Do one of the following, depending on whether you want to deactivate an object class or an attribute:
    • To deactivate an object class, in the console tree, double-click Active Directory Schema, and then expand Classes. Right-click the class that you want to deactivate, and then click Properties.
    • To deactivate an attribute, in the console tree, double-click Active Directory Schema, and then expand Classes. Right-click the attribute that you want to deactivate, and then click Properties.
  3. On the General tab, clear the Class is active check box or the Attribute is active check box, click Yes to confirm that you want to deactivate the class or attribute, and then click OK.

Add a new schema class or attribute definition to the AD LDS schema

  1. Open the Active Directory Schema snap-in and connect to the AD LDS instance in which you want to deactivate classes or attributes. For more information, see Use the Active Directory Schema Snap-in to Administer AD LDS Instances.
  2. In the console tree, double-click Active Directory Schema.
  3. Do one of the following:
    • To add a class definition, in the console tree, right-click Classes, click Create Class, and then provide the requested information.
    • To add an attribute definition, in the console tree, right-click Attributes, click Create Attribute, and then provide the requested information.

connect to an AD LDS instance with the Active Directory Schema snap-in

  1. Click Start, right-click Command Prompt, and then click Run as administrator.
  2. Type the following command, and then press ENTER:
  3. Click Start, click Run, type mmc, and then click OK.
  4. On the File menu, click Add/Remove Snap-in.
  5. Under Available snap-ins, click Active Directory Schema, click Add, and then click OK.
  6. To save this console, on the File menu, click Save.
  7. In Save As, do one of the following:
  8. To place the snap-in on the Administrative Tools menu, in File name, type a name for the snap-in, and then click Save.

      • To save the snap-in in a location other than the Administrative Tools folder, in Save in, navigate to a location for the snap-in. In File name, type a name for the snap-in, and then click Save.
    1. Open the Active Directory Schema snap-in.
    2. In the console tree, right-click Active Directory Schema, and then click Change Active Directory Domain Controller.
    3. In Change Directory Server, click <Type a Directory Server name[:port]here>, and type the Domain Name System (DNS) name, NetBIOS name, or IP address of the computer on which the AD LDS instance is running.
    4. Click the DNS or NETBIOS name of the IP address that you entered in the step above, and then click OK.
    5. In the console tree, click any container to view the objects in that container.

Install AD LDS and Configuration


Configure replication frequency within a site object

  1. Click Start, point to Administrative Tools, and then click Active Directory Sites and Services.
  2. In the console tree, right-click Active Directory Sites and Services, and then click Change Domain Controller. Specify the name and the port number of the server that holds the AD LDS instances in the configuration set for which you want to create site objects.
    For the purpose of this exercise, select the server name and the port number of your original or replica AD LDS instance.
    1. In the console tree, double-click the Sites container, and then click the site container in which the instance resides.
      For the purpose of this guide, click the site container Site1.
    2. In the details pane, right-click CN=NTDS Site Settings, and then click Properties.
    3. In the Properties dialog box, navigate to Site Settings tab, and then click Change Schedule.
    4. In the Schedule for NTDS Site Settings dialog box, select the block of time for which you want to schedule replication, and then click NoneOnce per HourTwice per Hour, or Four Times per Hour as the replication frequency.
    5. When you are finished updating the schedule, click OK.

Move an AD LDS instance into a site object

  1. Click Start, point to Administrative Tools, and then click Active Directory Sites and Services.
  2. In the console tree, right-click Active Directory Sites and Services, and then click Change Domain Controller. Specify the name and the port number of the server that holds the AD LDS instances in the configuration set for which you want to create site objects.
    For the purpose of this exercise, select the server name and the port number of your original or replica AD LDS instance.
    1. In the console tree, double-click the Sites container, double-click the site that contains the AD LDS instance that you want to move (by default, CN=Default-First-Site-Name), and then double-click the Servers container.
    2. In the Servers container, right-click the AD LDS instance that you want to move, and then click Move.
      For the purpose of this guide, select your original AD LDS instance.
    3. In the Move Server dialog box, select the site to which you want to move the AD LDS instance, and then click OK.
      For the purpose of this guide, select Site1 and Server1 in the Move Server dialog box.
    4. Repeat steps 3 through 5, this time moving your replica AD LDS instance into site object Site2.

Create a replica AD LDS instance by using the Active Directory Lightweight Directory Services Setup Wizard

  1. Click Start, point to Administrative Tools, and then click Active Directory Lightweight Directory Services Setup Wizard.
  2. On the Welcome to the Active Directory Lightweight Directory Services Setup Wizard page, click Next.
  3. On the Setup Options page, click A replica of an existing instance, and then click Next.
  4. On the Instance Name page, accept the default name instance2 (or instance1, if you are installing AD LDS on a second computer), and then click Next.
  5. On the Ports page, accept the default values of 50000 and 50001 (if you are installing onto the first computer) or 389 and 636 (if you are installing onto a second computer), and then click Next.
  6. On the Joining a Configuration Set page, in Server, type the host name or DNS name of the computer where the first AD LDS instance is installed. Then, type the LDAP port number in use by the first AD LDS instance (which is 389 by default), and then click Next.
  7. On the Administrative Credentials for the Configuration Set page, click the account that is used as the AD LDS administrator for your first AD LDS instance.
  8. On the Copy Application Partition page, select the application directory partitions that you want to replicate to the new AD LDS instance. (The schema and configuration partitions will be replicated automatically.)
  9. Accept the default values on the remaining Active Directory Lightweight Directory Services Set Wizard pages by clicking Next on each page, and then click Finish on the Completing the Active Directory Application Mode Setup Wizard page.
  10. After the installation is complete, use the ADSI Edit snap-in to confirm that the selected directory partition has been replicated to your second AD LDS instance.

Import Data into an AD LDS Instance

  1. Open a command prompt.
  2. Do one of the following:
    • To import directory objects, at the command prompt, type the following command, and then press ENTER:

      ldifde-i-ffilename-sservername:port-m-ausername domain password
    • To export directory objects, at the command prompt, type the following command, and then press ENTER:

      ldifde-e-ffilename-sservername:port-m-ausername domain password

Use Ldp.exe to Manage an AD LDS Instance

  1. Open Ldp.
  2. On the Connection menu, click Connect .
  3. In Server , type the Domain Name System (DNS) name, NetBIOS name, or IP address of the computer on which the AD LDS instance is running.
  4. In Port , type the LDAP or Secure Sockets Layer (SSL) communication port number that the AD LDS instance to which you want to connect is using, and then click OK .
  5. On the Connection menu, click Bind .
  6. Do one of the following:
    • To bind using the credentials that you logged on with, click Bind as currently logged on user .
    • To bind using a domain user account, click Bind with credentials , type the user name, password, and domain name (or the computer name, if you are using a local workstation account) of the account that you are using, and then click OK .
    • To bind using just a user name and password, click Simple bind , type the user name and password of the account that you are using, and then click OK .
    • To bind using an advanced method (NTLM, Distributed Password Authentication (DPA), negotiate, or digest), click Advanced (method) , click Advanced , in Methodselect the desired method, set other options as needed, and then click OK .
  7. When you are finished specifying the bind options, click OK .
  8. On the View menu, click Tree .
  9. In the BaseDN list, click the distinguished name of the object to use as the base object in the navigation pane.

Additional considerations

  • To open Ldp, click Start , point to Run , type ldp , and then click OK .
  • The default communication port for LDAP is 389. The default communication port for SSL is 636.
  • To connect to an AD LDS instance running on the local computer, type localhost as the server name.

Use ADSI Edit to Manage an AD LDS Instance

  1. Open ADSI Edit.
  2. In the console tree, click ADSI Edit .
  3. On the Action menu, click Connect to .
  4. In Select or type a domain or server: (Server |   Domain[:port] , type the Domain Name Service (DNS) name, NetBIOS name, or IP address of the computer on which the AD LDS instance is running, followed by a colon (:) and the Lightweight Directory Access Protocol (LDAP) communication port that the AD LDS instance to which you want to connect is using.
  1. Under Connection point , do one of the following:
    • Click Select or type a distinguished name (DN) or naming context , and then specify the distinguished name to which you want to connect.
    • Click Select a well-known naming context , and then click Configuration , RootDSE , or Schema .
  2. To connect with an alternative account, click Advanced ; click Specify Credentials ; and then, under Connect using these credentials , type the domain, user name, and password of the account.

Additional considerations

  • To open ADSI Edit, on a computer with the AD LDS server role installed, click Start , click Administrative Tools , and then click ADSI Edit .
  • To create additional connections to AD LDS instances, on the Action menu, click Connect to for each new connection.
  • The default communication port for LDAP is 389.
  • To connect to an AD LDS instance running on the local computer, type localhost as the server name.

Starting, stopping, or restarting an AD LDS instance

  1. Open Server Manager.
  2. In the console tree, double-click Roles , and then click Active Directory Lightweight Directory Services .
  3. In the details pane, in the System Services list, click the AD LDS instance that you want to manage.
  4. Click Start , Stop , or Restart .

Additional considerations

  • To open the Server Manager snap-in, click Start , click Administrative Tools , and then click Server Manager .
  • By default, an AD LDS instance is configured to start automatically.

To start or stop an AD LDS instance using a command prompt

  1. Open a command prompt.
  2. Do one of the following:
    • To start an AD LDS instance, at the command prompt, type the following command, and then press ENTER:

      net startinstance_name

      where instance_name represents the AD LDS instance that you want to start.
    • To stop an AD LDS instance, at the command prompt, type the following command, and then press ENTER:

      net stop   instance_name

      where instance_name represents the AD LDS instance that you want to stop.

Additional considerations

  • To open a command prompt, click Start , right-click Command Prompt , and then click Run as administrator .
  • You cannot pause or resume an AD LDS instance from a command prompt.
  • By default, an AD LDS instance is configured to start automatically.
  • For more information about the net command, type net /? at a command prompt or see Help and Support.

Install an AD LDS Replica from Media

  1. Restore a backup copy of the AD LDS instance from which you want to install to an alternate location. (Do not restore the backup to the original location of the AD LDS instance.)
  2. At a command prompt, type the following command, and then press ENTER:
    %windir%\adam\adaminstall /adv
  3. Follow the steps in the Active Directory Lightweight Directory Services Setup Wizard.

Additional considerations

  • To open a command prompt, click Start , right click Command Prompt , and then click Run as administrator .
  • You can install an AD LDS replica only from media that is created by restoring a backup copy of an AD LDS instance.
  • When you restore an AD LDS instance for use in a replica installation from media, you must restore the files to an alternate location, rather than to the original location from which they were backed up.
  • After you restore AD LDS files from a backup to an alternate location, the Adamntds.dit file and Edb*.log files will be nested in the specified alternate location. For example, if you specify C:\restore_dir as the restore location for the AD LDS files, Adamntds.dit and the Edb*.log files will be located at C:\restore_dir\Program Files\Microsoft ADAM\instancename \data, where instancename represents the AD LDS instance that was restored.

Create a Replica AD LDS Instance

Membership in the Administrators group, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at http://go.microsoft.com/fwlink/?LinkId=83477.

To create a replica AD LDS instance

  1. Click Start , point to Administrative Tools , and then click Active Directory Lightweight Directory Services Setup Wizard .
  2. On the Welcome to the Active Directory Lightweight Directory Services Setup Wizard page, click Next .
  3. On the Setup Options page, click A replica of an existing instance , and then click Next .
  4. Finish creating the new instance by following the wizard instructions.

Create a New AD LDS Instance

Membership in the Administrators group, or equivalent, is the minimum required to complete this procedure. Review details about using the appropriate accounts and group memberships at http://go.microsoft.com/fwlink/?LinkId=83477.

To use the Active Directory Lightweight Directory Services Setup Wizard to create a new AD LDS instance

  1. Click Start , point to Administrative Tools , and then click Active Directory Lightweight Directory Services Setup Wizard .
  2. On the Welcome to the Active Directory Lightweight Directory Services Setup Wizard page, click Next .
  3. On the Setup Options page, click A unique instance , and then click Next .
  4. Finish creating the new instance by following the wizard instructions.

To use the Active Directory Lightweight Directory Services Setup Wizard to create a new AD LDS instance in Windows Server 2008

  1. To start the Active Directory Lightweight Directory Services Setup Wizard in Windows Server® 2012, click Start , type. Click Add roles and features in Server Manager.
  2. On the Welcome to the Active Directory Lightweight Directory Services Setup Wizard page, click Next .
  3. On the Setup Options page, click A unique instance , and then click Next .
  4. Finish creating the new instance by following the wizard instructions.

Restoring an AD LDS instance that belongs to a configuration set

To completely restore an AD LDS instance that belongs to a configuration set

  1. On one of the remaining AD LDS instances in the configuration set, delete the server object representing the AD LDS instance that you want to restore, as follows:
    1. Open a command prompt.
    2. At the command prompt, type dsmgmt , and then press ENTER.
    3. At the dsmgmt: prompt, type metadata cleanup , and then press ENTER.
    4. At the metadata cleanup: prompt, type select operation target , and then press ENTER.
    5. At the select operation target: prompt, type connections , and then press ENTER.
    6. At the server connections: prompt, type the following command, and then press ENTER:

      connect to servercomputername:portnumber

      where computername:portnumber represents the AD LDS instance to which you are connecting.
    7. At the server connections: prompt, type q , and then press ENTER.
    8. At the select operation target: prompt, type list sites , and then press ENTER. Identify the number corresponding to the site in which the server object that you want to delete resides.
    9. At the select operation target: prompt, type select site   n , and then press ENTER, where n represents the number identified in the previous step.
    10. At the select operation target: prompt, type list naming contexts , and then press ENTER. Identify the number that corresponds to a naming context previously held by the server whose server object you want to delete.
    11. Type select naming context   n , and then press ENTER, where n represents the number identified in the previous step.
    12. Type list servers in site , and then press ENTER. Identify the number that is associated with the server whose server object you want to delete.
    13. Type select server   n , and then press ENTER, where n represents the number identified in the previous step.
    14. At the select operation target: prompt, type q , and then press ENTER.
    15. At the metadata cleanup: prompt, type remove selected server , and then press ENTER. Click yes to confirm the deletion of the server object.
    16. In addition, you must delete the server object from the sites container:

      CN=Servers,CN= sitename ,CN=Sites,CN=Configuration,CN={ GUID }

      where sitename represents the name of the site in which the server object exists, and GUID represents the globally unique identifier (GUID) of the AD LDS instance.
  2. Open Backup.
  3. On the Action menu, click Recover .
  4. Follow the steps in the Recovery Wizard to specify the location of the source backup data and identify the specific backup from which you want to recover instance data.
  5. In Select recovery type , click Files and folders , and then click Next.
  6. In Select items to recover , browse to and select the folder containing the instance data files. By default, AD LDS database and log files are located in %ProgramFiles%\Microsoft ADAM\ instancename where instancename is the AD LDS instance name.
  7. In Specify recovery options , click Alternate location , specify a temporary location for the recovered files, and then click Next .
  8. To complete the restore, click Finish .
  9. At a command prompt, type the following command, and then press ENTER:
    %windir%\adam\adaminstall /adv
  10. Follow the steps in the Active Directory Lightweight Directory Services Setup Wizard.

Additional considerations

  • To open Backup, click Start , click Administrative Tools , and then click Backup .
  • To open a command prompt, click Start , right-click Command Prompt , and then click Run as administrator .
  • For help with dsmgmt , at a dsmgmt prompt, type ? , and then press ENTER.
  • If you accidentally start a restore of an AD LDS instance over a currently running AD LDS instance, we recommend that you immediately restart the computer, stop the AD LDS instance, and then perform the restoration again.

Restoring an AD LDS instance that does not belong to a configuration set

  1. Using the Active Directory Lightweight Directory Services Setup Wizard, create an AD LDS instance, specifying the same settings that you used during your original AD LDS installation. However, do not create an application directory partition during setup.
  2. Stop the AD LDS instance that you just created, as follows:
    1. Click Start , click Administrative Tools , and then click Services .
    2. In Services, right-click the AD LDS instance, and then click Stop .
  3. Open Backup.
  4. On the Action menu, click Recover .
  5. Follow the steps in the Recovery Wizard to specify the location of the source backup data and identify the specific backup from which you want to recover instance data.
  6. In Select recovery type , click Files and folders , and then click Next.
  7. In Select items to recover , browse to and select the folder that contains the instance data files. By default, AD LDS database and log files are located in %ProgramFiles%\Microsoft ADAM\ instancename, where instancename is the AD LDS instance name.
  8. In Specify recovery options , click Original locations and Overwrite existing files with recovered files , and then click Next .
  9. To complete the restore, click Finish .
  10. After the restore is complete, close Backup.
  11. Start the AD LDS instance that you just created, as follows:
    1. Click Start , click Administrative Tools , and then click Services .
    2. In Services, right-click the AD LDS instance, and then click Start .

Additional considerations

  • To open Backup, click Start , click Administrative Tools , and then click Backup .
  • If you accidentally start a restore of an AD LDS instance over a currently running AD LDS instance, we recommend that you immediately restart the computer, stop the AD LDS instance, and then perform the restoration again.