Topic Last Modified: 2013-02-21

Returns information indicating whether your Active Directory forest has been correctly configured to allow for the installation of Lync Server. This cmdlet was introduced in Lync Server 2010.

Syntax

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

Examples

EXAMPLE 1

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

Copy Code
Get-CsAdForest

EXAMPLE 2

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.

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

Detailed Description

Before you can install Lync Server, you must make a number of forest-level changes to Active Directory Domain Services. 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 the Get-CsAdForest cmdlet 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.

The Get-CsAdForest cmdlet 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 the Get-CsAdForest cmdlet independently of the Setup Wizard in order to verify the forest status before you try to install Lync Server.

The Get-CsAdForest cmdlet 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"}

Parameters

Parameter Required Type Description

GlobalCatalog

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

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

GlobalSettingsDomainController

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

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.

Report

Optional

System.String

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

RootDomainController

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

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

SkipPrepareCheck

Optional

System.Boolean

When set to True ($True), causes Get-CsAdForest to run without first doing its initial preparation checks.

Input Types

None.

Return Types

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