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
Added a short note about accidental protection.
Changed two notes to follow Microsoft alert style.
Fixed a cursive typo.
Minor changes to follow markdown standards.
Specifies the user account credentials to use to perform this task.
165
177
The default credentials are the credentials of the currently logged on user unless the cmdlet is run from an Active Directory PowerShell provider drive.
166
178
If the cmdlet is run from such a provider drive, the account associated with the drive is the default.
167
179
168
-
To specify this parameter, you can type a user name, such as User1 or Domain01\User01 or you can specify a **PSCredential** object.
180
+
To specify this parameter, you can type a user name, such as `User1` or `Domain01\User01` or you can specify a **PSCredential** object.
169
181
If you specify a user name for this parameter, the cmdlet prompts for a password.
170
182
171
183
You can also create a **PSCredential** object by using a script or by using the **Get-Credential** cmdlet.
Specifies an instance of an OU object to use as a template for a new OU object.
224
239
225
240
You can use an instance of an existing OU object as a template or you can construct a new OU object by using the Windows PowerShell command line or by using a script.
@@ -232,7 +247,8 @@ You can override property values of the new object by setting the appropriate pa
232
247
Method 2: Create a new **ADOrganizationalUnit** object and set the property values by using the Windows PowerShell command line interface.
233
248
Then pass this object to the *Instance* parameter of the **New-ADOrganizationalUnit** cmdlet to create the new Active Directory OU object.
234
249
235
-
Note: Specified attributes are not validated, so attempting to set attributes that do not exist or cannot be set raises an error.
250
+
> [!NOTE]
251
+
> Specified attributes are not validated, so attempting to set attributes that do not exist or cannot be set raises an error.
Specifies the X.500 path of the OU or container where the new object is created.
338
359
339
360
In many cases, a default value is used for the *Path* parameter if no value is specified.
@@ -342,22 +363,24 @@ Note that rules listed first are evaluated first and when a default value can be
342
363
343
364
In Active Directory Domain Services (AD DS) environments, a default value for *Path* is set in the following cases:
344
365
345
-
- If the cmdlet is run from an Active Directory PowerShell provider drive, the parameter is set to the current path of the provider drive.
366
+
- If the cmdlet is run from an Active Directory PowerShell provider drive, the parameter is set to the current path of the provider drive.
346
367
- If the cmdlet has a default path, this is used.
347
-
For example: in New-ADUser, the *Path* parameter defaults to the Users container.
348
-
- 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.
368
+
For example: in New-ADUser, the *Path* parameter defaults to the Users container.
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.
349
370
350
371
In AD LDS environments, a default value for *Path* is set in the following cases:
351
372
352
-
- 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.
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.
353
374
- If the cmdlet has a default path, this is used.
354
-
For example: in New-ADUser, the *Path* parameter defaults to the Users container.
375
+
For example: in New-ADUser, the *Path* parameter defaults to the Users container.
355
376
- If the target AD LDS instance has a default naming context, the default value of *Path* is set to the default naming context.
356
-
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.
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.
357
378
- If none of the previous cases apply, the *Path* parameter does not take any default value.
358
379
359
-
Note: The Active Directory Provider cmdlets, such as **New-Item**, **Remove-Item**, **Remove-ItemProperty**, **Rename-Item**, and **Set-ItemProperty**, also contain a **Path** property.
360
-
However, for the Active Directory Provider cmdlets, the *Path* parameter identifies the path of the actual object rather than the container.
380
+
> [!NOTE]
381
+
> The Active Directory Provider cmdlets, such as **New-Item**, **Remove-Item**, **Remove-ItemProperty**, **Rename-Item**, and **Set-ItemProperty**, also contain a **Path** property.
382
+
>
383
+
> However, for the Active Directory Provider cmdlets, the *Path* parameter identifies the path of the actual object rather than the container.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
498
528
499
529
## INPUTS
500
530
501
531
### None or Microsoft.ActiveDirectory.Management.ADOrganizationalUnit
532
+
502
533
An OU object that is a template for the new OU object is received by the *Instance* parameter.
503
534
504
535
## OUTPUTS
505
536
506
537
### None or Microsoft.ActiveDirectory.Management.ADOrganizationalUnit
538
+
507
539
Returns the new OU object when the *PassThru* parameter is specified.
508
540
By default, this cmdlet does not generate any output.
509
541
510
542
## NOTES
511
-
* This cmdlet does not work with an Active Directory snapshot.
512
-
* This cmdlet does not work with a read-only domain controller.
543
+
544
+
- This cmdlet does not work with an Active Directory snapshot.
545
+
- This cmdlet does not work with a read-only domain controller.
513
546
514
547
## RELATED LINKS
515
548
@@ -518,4 +551,3 @@ By default, this cmdlet does not generate any output.
0 commit comments