Disable-CsAdForest

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

Syntax

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

Description

When you install Skype for Business 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 Skype for Business Server 2015, creating universal security groups needed to manage Skype for Business Server, and granting global settings object access administrative rights and permissions to these groups.

If you later decide to uninstall Skype for Business 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.

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

Historical Note: The tasks carried out by Disable-CsAdForest are similar to the tasks carried out by the following Microsoft Office Communications Server 2007 R2 command: Lcscmd.exe /forest /action:ForestUnprep

Examples

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

Disable-CsAdForest

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 Skype for Business Server. In that case, you will need to rolls back the domain preparation by running the Disable-CsAdDomain cmdlet.

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

Disable-CsAdForest -Force

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 Skype for Business Server. Rollback is forced by including the Force parameter.

Parameters

-Confirm

Prompts you for confirmation before executing the command.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Force

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 Skype for Business 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.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-GlobalCatalog

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.

Type:Fqdn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-GlobalSettingsDomainController

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.

Type:Fqdn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-GroupDomain

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

Type:Fqdn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-GroupDomainController

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

Type:Fqdn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-Report

Enables you to specify a file path for the log file created when the cmdlet runs. For example:

-Report "C:\Logs\DisableForest.html"

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-RootDomainController

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

Type:Fqdn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Lync Server 2010, Lync Server 2013, Skype for Business Server 2015, Skype for Business Server 2019

Inputs

None

Outputs

None