Get-CMActiveDirectoryForest

Gets one or more Active Directory forest objects.

Syntax

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

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
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-DisableWildcardHandling

Indicates that wildcard handling is disabled.

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

Indicates that wildcard handling is enabled.

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

Specifies the FQDN of a Configuration Manager object.

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