Get-CMActiveDirectoryForest

Get-CMActiveDirectoryForest

Gets one or more Active Directory forest objects.

Syntax

Parameter Set: SearchByFQDN
Get-CMActiveDirectoryForest [-ForestFqdn <String> ] [ <CommonParameters>]

Parameter Set: SearchByIdMandatory
Get-CMActiveDirectoryForest -Id <String[]> [ <CommonParameters>]

Detailed Description

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

Parameters

-ForestFqdn<String>

Specifies the FQDN of a Configuration Manager object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Id<String[]>

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

Aliases

ForestId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Get all Active Directory forest objects

This command gets all Active Directory forest objects.

PS C:\> Get-CMActiveDirectoryForest

Example 2: Get an Active Directory Forest object by ID

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

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

Example 3: Get Active Directory Forest by domain name

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

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

New-CMActiveDirectoryForest

Set-CMActiveDirectoryForest

Remove-CMActiveDirectoryForest