Skip to main content

Test Active Directory Scripts on a Local Installation

Problem

You want to test your Active Directory scripts against a local installation.

Solution

To test your scripts against a local system, install Active Directory Application Mode (ADAM) and its sample configuration.

Discussion

To test your scripts against a local installation, you’ll need to install ADAM, and then create a test instance.

Install ADAM

To install ADAM, the first step is to download it. Microsoft provides ADAM free of charge from the Download Center. You can obtain it by searching for “Active Directory Application Mode” at http://download.microsoft.com.

Create a test instance

From the ADAM menu in the Windows Start menu, select Create an ADAM instance. In the Setup Options page that appears next, select A unique instance.In the Instance Name page, type Test as an instance name. Accept the default ports, and then select Yes, create an application directory partition on the next page. As the partition name, type DC=Fabrikam,DC=COM

In the next pages, accept the default file locations, service accounts, and administrators.

When the setup wizard gives you the option to import LDIF files, import all available files except for MSAZMan.LDF. Click Next on this page and the confirmation page to complete the instance setup.

Open a PowerShell window, and test your new instance:

PS >[adsi] "LDAP://localhost:389/dc=Fabrikam,dc=COM"

distinguishedName

{DC=Fabrikam,DC=COM} The [adsi] tag is a type shortcut, like several other type shortcuts in PowerShell. The [adsi] type shortcut provides a quick way to create and work with directory entries through Active Directory Service Interfaces.

Although scripts that act against an ADAM test environment are almost identical to those that operate directly against Active Directory, there are a few minor differences. ADAM scripts specify the host and port in their binding string (that is, localhost:389/), whereas Active Directory scripts do not. Test Active Directory scripts efficiently with Windows PowerShell on a United Kingdom Dedicated Server, providing dedicated resources, reliable performance, and full administrative control for developing, testing, and managing directory services.

Help Category