Get-​CM​Active​Directory​Forest

Gets one or more Active Directory forest objects.

Syntax

Get-CMActiveDirectoryForest
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-ForestFqdn <String>]
   [<CommonParameters>]
Get-CMActiveDirectoryForest
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   -Id <String[]>
   [<CommonParameters>]

Description

The Get-CMActiveDirectoryForest cmdlet gets one or more Active Directory forest objects in Microsoft System Center Configuration Manager. You can get an Active Directory forest object by ID or fully qualified domain name (FQDN).

Examples

Example 1: Get all Active Directory forest objects

PS C:\> Get-CMActiveDirectoryForest

This command gets all Active Directory forest objects.

Example 2: Get an Active Directory Forest object by ID

PS C:\> Get-CMActiveDirectoryForest -Id "16777217"

This command gets an Active Directory forest object that has the ID 16777217.

Example 3: Get Active Directory Forest by domain name

PS C:\> Get-CMActiveDirectoryForest -ForestFqdn "tsqa.contoso.com"

This command gets an Active Directory forest object that has the FQDN tsqa.contoso.com.

Required Parameters

-Id

Specifies an array of IDs of Configuration Manager objects. You can find the identifier value in the ForestID property of an Active Directory forest.

Type:String[]
Aliases:ForestId
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForestFqdn

Specifies the FQDN of a Configuration Manager object.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False