Get-CMActiveDirectoryForest
Gets one or more Active Directory forest objects.
Syntax
SearchByFQDN (Default)
Get-CMActiveDirectoryForest
[-ForestFqdn <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
SearchByIdMandatory
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.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ForestFqdn
Specifies the FQDN of a Configuration Manager object.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | True |
DontShow: | False |
Parameter sets
SearchByFQDN
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-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.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | ForestId |
Parameter sets
SearchByIdMandatory
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.