AD Path Defaults
In many cases, a default value will be used for -Path if no value is specified.
The rules for determining the default value are given below.
Note that rules listed first are evaluated first and once a default value can be determined, no further rules will be evaluated.
In AD DS environments, a default value for -Path will be set in the following cases:
- If the cmdlet is run from an Active Directory PowerShell provider drive, the parameter
is set to the current path of the provider drive.
- If the cmdlet has a default path, this will be used. For example: in New-ADUser, the Path parameter would default to the Users container.
- If none of the previous cases apply, the default value of Path will be set to the default
partition or naming context of the target domain.
In AD LDS environments, a default value for -Path will be set in the following cases:
- If the cmdlet is run from an Active Directory PowerShell provider drive, the parameter is set to the current path of the provider drive.
- If the cmdlet has a default path, this will be used. For example: in New-ADUser, the Path parameter would default to the Users container.
If the target AD LDS instance has a default naming context, the default value of Path
will be set to the default naming context.
To specify a default naming context for an AD LDS environment, set the msDS-defaultNamingContext
property of the Active Directory directory service agent (DSA) object (nTDSDSA) for the AD LDS instance.
- If none of the previous cases apply, the Path parameter will not take any default value.
“If the path be beautiful, let us not ask where it leads” ~ Anatole France
Related PowerShell Cmdlets
AD commands
Copyright © 1999-2023
SS64.com
Some rights reserved