Saturday, February 11, 2012

Prepare Lync Schema Using command

Use the Install-CsAdServerSchema cmdlet to extend the Active Directory schema. After schema preparation is complete, manually verify that the schema partition has been replicated before proceeding to forest preparation.

To use cmdlets to prepare the schema of the current forest
  1. Log on to a computer in the forest as a member of the Schema Admins group and with administrator rights on the schema master.
  2. Install Lync Server Core components as follows:
    1. From the Lync Server 2010 installation folder or media, run Setup.exe to start the Lync Server Deployment Wizard.
    2. If you are prompted to install the Microsoft Visual C++ Redistributable, click Yes.
    3. The Microsoft Lync Server 2010 Setup dialog box prompts you for a location to install the Lync Server 2010 files. Choose the default location or Browse to a location of your choice, and then click Install.
    4. On the License Agreement page, check I accept the terms in the license agreement, and then click OK. The installer installs the Lync Server 2010 Core Components.
  3. Start the Lync Server Management Shell: Click Start, click All Programs, click Microsoft Lync Server 2010, and then click Lync Server Management Shell.
  4. Run:
    Install-CsAdServerSchema [-Ldf <directory where the .ldf file is located>] 
    If you do not specify the Ldf parameter, the default value is the Microsoft Lync Server 2010 installation path that is read from the registry.
    For example:
    Install-CsAdServerSchema -Ldf "C:\Program Files\Microsoft Lync Server 2010\Deployment\Setup"
  5. Use the following cmdlet to verify that schema preparation ran to completion.
    Get-CsAdServerSchema 
    This cmdlet returns a value of SCHEMA_VERSION_STATE_CURRENT if schema preparation was successful.
  6. Wait for Active Directory replication to complete or force replication.
  7. Manually verify that the schema changes replicated to all other domain controllers, as described in the following procedure.

  1. Log on to a domain controller as a member of the Enterprise Admins group.
  2. Open ADSI Edit by clicking Start, clicking Administrative Tools, and then clicking ADSI Edit.
    Alternatively, you can run adsiedit.msc from the command line.
  3. In the Microsoft Management Console (MMC) tree, if it is not already selected, click ADSI Edit.
  4. On the Action menu, click Connect to.
  5. In the Connection Settings dialog box under Select a well known Naming Context, select Schema, and then click OK.
  6. Under the schema container, search for CN=ms-RTC-SIP-SchemaVersion. If this object exists, and the value of the rangeUpper attribute is 1100 and the value of the rangeLower attribute is 14, then the schema was successfully updated and replicated. If this object does not exist or the values of the rangeUpper and rangeLower attributes are not as specified, then the schema was not modified or has not replicated.

1 comment: