Topic Last Modified: 2010-10-27

Returns information indicating whether your Active Directory forest has been correctly configured to allow for the installation of Microsoft Lync Server 2010.

Syntax

Get-CsAdForest [-GlobalCatalog <Fqdn>] [-GlobalSettingsDomainController <Fqdn>] [-Report <String>] [-RootDomainController <Fqdn>] [-SkipPrepareCheck <$true | $false>]

Parameters

Parameter Required Type Description

GlobalCatalog

Optional

String

Fully qualified domain name (FQDN) of a global catalog server in your domain. This parameter is not required if you are running Get-CsAdForest on a computer with an account in your domain.

GlobalSettingsDomainController

Optional

String

FQDN of a domain controller where global settings are stored. If global settings are stored in the System container in AD DS, then this parameter must point to the root domain controller. If global settings are stored in the Configuration container, then any domain controller can be used and this parameter can be omitted.

RootDomainController

Optional

String

FQDN of the root domain controller, used to create trust paths for clients that need to access resources in domains other than their own.

Force

Optional

Switch Parameter

Suppresses the display of any non-fatal error message that might arise when running the command.

Report

Optional

String

Enables you to specify a file path for the log file created when the cmdlet runs. For example: -Report "C:\Logs\ForestPrep.html"

Detailed Description

Before you can install Lync Server 2010, you must make a number of forest-level changes to Active Directory Domain Services (AD DS). This includes creating display specifiers and objects specific to Lync Server, creating the universal security groups that are needed to manage Lync Server, and granting global settings object access permissions to these groups. The Get-CsAdForest cmdlet returns a single value that tells you whether or not Lync Server can be installed in a forest. If Get-CsAdForest returns the value LC_FORESTSETTINGS_STATE_READY then you can install Lync Server in the forest. If the cmdlet returns LC_FORESTSETTINGS_STATE_NOT_READY then you will need to correctly prepare the forest before trying to install Lync Server.

Get-CsAdForest runs as part of the Setup Wizard; if the Wizard determines that the forest is not correctly prepared, then you will receive an error message and Setup will stop. However, you can also run Get-CsAdForest independently of the Setup Wizard in order to verify the forest status before you try to install Lync Server.

Get-CsAdForest performs the same function as the following Microsoft Office Communications Server 2007 R2 command:

Lcscmd.exe /forest /action:CheckForestPrepState

Who can run this cmdlet: By default, anyone who has read permissions to Active Directory can run the Get-CsAdForest cmdlet locally. Typically all domain members have this permission.

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Get-CsAdForest"}

Input Types

None.

Return Types

Get-CsAdForest returns instances of the Microsoft.Rtc.Management.Deployment.LcForestSettingsState object.

Example

-------------------------- Example 1 --------------------------

Copy Code
Get-CsAdForest

The preceding example returns information indicating whether your Active Directory forest has been correctly configured to allow for the installation of Lync Server.

-------------------------- Example 2 --------------------------

Copy Code
Get-CsAdForest -Report C:\Logs\ForestState.html

In Example 2, forest state information is returned and the forest readiness is displayed on the screen. In addition, detailed information about the steps taken to determine the forest state is written to a file named C:\Logs\ForestState.html. This file includes a detailed list of all the Active Directory groups and Active Directory containers where permissions were verified.