You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docset/winserver2022-ps/activedirectory/New-ADOrganizationalUnit.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,8 @@ You can override property values from the template by setting cmdlet parameters.
44
44
For more information, see the *Instance* parameter description for this cmdlet.
45
45
46
46
Method 3: Use the **Import-Csv** cmdlet with the **New-ADOrganizationalUnit** cmdlet to create multiple Active Directory OU objects.
47
-
To do this, use the **Import-Csv** cmdlet to create the custom objects from a comma-separated value (CSV) file that contains a list of object properties.
47
+
To do this, use the [**Import-Csv**](https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/import-csv) cmdlet to create the custom objects
48
+
from a comma-separated value (CSV) file that contains a list of object properties.
48
49
Then pass these objects through the pipeline to the **New-ADOrganizationalUnit** cmdlet to create the OU objects.
49
50
50
51
## EXAMPLES
@@ -180,7 +181,7 @@ If the cmdlet is run from such a provider drive, the account associated with the
180
181
To specify this parameter, you can type a user name, such as `User1` or `Domain01\User01` or you can specify a **PSCredential** object.
181
182
If you specify a user name for this parameter, the cmdlet prompts for a password.
182
183
183
-
You can also create a **PSCredential** object by using a script or by using the **Get-Credential** cmdlet.
184
+
You can also create a **PSCredential** object by using a script or by using the [Get-Credential](https://learn.microsoft.com/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.3) cmdlet.
184
185
You can then set the *Credential* parameter to the **PSCredential** object.
185
186
186
187
If the acting credentials do not have directory-level permission to perform the task, Active Directory PowerShell returns a terminating error.
@@ -364,17 +365,15 @@ Note that rules listed first are evaluated first and when a default value can be
364
365
In Active Directory Domain Services (AD DS) environments, a default value for *Path* is set in the following cases:
365
366
366
367
- If the cmdlet is run from an Active Directory PowerShell provider drive, the parameter is set to the current path of the provider drive.
367
-
- If the cmdlet has a default path, this is used.
368
-
For example: in New-ADUser, the *Path* parameter defaults to the Users container.
368
+
- If the cmdlet has a default path, this is used. For example: in **New-ADUser**, the *Path* parameter defaults to the Users container.
369
369
- If none of the previous cases apply, the default value of *Path* is set to the default partition or naming context of the target domain.
370
370
371
-
In AD LDS environments, a default value for *Path* is set in the following cases:
371
+
In AD LDS environments, a default value for *Path* is set in the following cases:
372
372
373
373
- If the cmdlet is run from an Active Directory module for PowerShell provider drive, the parameter is set to the current path of the provider drive.
374
-
- If the cmdlet has a default path, this is used.
375
-
For example: in New-ADUser, the *Path* parameter defaults to the Users container.
374
+
- If the cmdlet has a default path, this is used. For example: in **New-ADUser**, the *Path* parameter defaults to the Users container.
376
375
- If the target AD LDS instance has a default naming context, the default value of *Path* is set to the default naming context.
377
-
To specify a default naming context for an AD LDS environment, set the **msDS-defaultNamingContext** property of the Active Directory directory service agent object (**nTDSDSA**) for the AD LDS instance.
376
+
To specify a default naming context for an AD LDS environment, set the **msDS-defaultNamingContext** property of the Active Directory directory service agent object (**nTDSDSA**) for the AD LDS instance.
378
377
- If none of the previous cases apply, the *Path* parameter does not take any default value.
0 commit comments