Topic Last Modified: 2013-02-20

Undoes the forest preparation tasks carried out by the Enable-CsAdForest cmdlet. This cmdlet is typically used only if you are uninstalling Lync Server. This cmdlet was introduced in Lync Server 2010.

Syntax

Disable-CsAdForest [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-GlobalCatalog <Fqdn>] [-GlobalSettingsDomainController <Fqdn>] [-GroupDomain <Fqdn>] [-GroupDomainController <Fqdn>] [-Report <String>] [-RootDomainController <Fqdn>] [-WhatIf [<SwitchParameter>]]

Examples

EXAMPLE 1

The command shown in Example 1 rolls back the forest preparation tasks carried out by the Enable-CsAdForest cmdlet. Because the Force parameter is not included, the command will fail if the Disable-CsAdForest cmdlet detects that at least one of the domains in the forest is still prepared for Lync Server. In that case, you will need to rolls back the domain preparation by running the Disable-CsAdDomain cmdlet.

Copy Code
Disable-CsAdForest

EXAMPLE 2

In Example 2, forest preparation is rolled back even if the Disable-CsAdForest cmdlet detects that at least one of the domains in the forest is still prepared for Lync Server. Rollback is forced by including the Force parameter.

Copy Code
Disable-CsAdForest -Force

Detailed Description

When you install Lync Server, you make a number of forest-level changes to Active Directory Domain Services. These changes (which can be carried out by using the Enable-CsAdForest cmdlet) include creating objects and display specifiers that are specific to Lync Server, creating universal security groups needed to manage Lync Server, and granting global settings object access administrative rights and permissions to these groups. If you later decide to uninstall Lync Server (or if you encounter issues during the setup process) you might need to roll back these forest-level changes. The Disable-CsAdForest cmdlet provides a way for you to undo all the forest-level modifications made by the Enable-CsAdForest cmdlet.

The tasks carried out by the Disable-CsAdForest cmdlet are similar to the tasks carried out by the following Microsoft Office Communications Server 2007 R2 command:

Lcscmd.exe /forest /action:ForestUnprep

Who can run this cmdlet: You must be an enterprise administrator in order to run the Disable-CsAdForest cmdlet locally.

Parameters

Parameter Required Type Description

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command.

Force

Optional

System.Management.Automation.SwitchParameter

If present, forces the rollback of the forest preparation steps even if the Disable-CsAdForest cmdlet detects that at least one of the domains in the forest is still prepared for Lync Server. If not present, the command will fail if the Disable-CsAdForest cmdlet detects that at least one of the domains in the forest is still prepared for Lync Server.

GlobalCatalog

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

FQDN of a global catalog server in your domain. This parameter is not required if you are running the Disable-CsComputer 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 Active Directory Domain Services, 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.

GroupDomain

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

Fully qualified domain name (FQDN) of the domain where the Lync Server universal groups were created (for example, -GroupDomain asia.litwareinc.com). If this parameter is not included, the Disable-CsAdForest cmmmdlet will look for the universal groups in the local domain.

GroupDomainController

Optional

Microsoft.Rtc.Management.Deploy.Fqdn

FQDN of a domain controller where universal group information is stored.

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\DisableForest.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.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Describes what would happen if you executed the command without actually executing the command.

Input Types

None.

Return Types

None.