Edit

Share via


Get-CMActiveDirectoryForest

Gets one or more Active Directory forest objects.

Syntax

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

Description

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

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Get all Active Directory forest objects

PS XYZ:\> Get-CMActiveDirectoryForest

This command gets all Active Directory forest objects.

Example 2: Get an Active Directory Forest object by ID

PS XYZ:\> 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 XYZ:\> Get-CMActiveDirectoryForest -ForestFqdn "tsqa.contoso.com"

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

Parameters

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

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

-ForestFqdn

Specifies the FQDN of a Configuration Manager object.

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

-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
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

IResultObject[]

IResultObject