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
The **New-ADUser** cmdlet creates an Active Directory user.
43
43
You can set commonly used user property values by using the cmdlet parameters.
44
44
45
-
You can set property values that are not associated with cmdlet parameters by using the *OtherAttributes* parameter.
45
+
You can set property values that are not associated with cmdlet parameters by using the _OtherAttributes_ parameter.
46
46
When using this parameter, be sure to place single quotes around the attribute name.
47
47
48
-
You must specify the *SamAccountName* parameter to create a user.
48
+
You must specify the _SamAccountName_ parameter to create a user.
49
49
50
50
You can use the **New-ADUser** cmdlet to create different types of user accounts such as iNetOrgPerson accounts.
51
-
To do this in Active Directory Domain Services (AD DS), set the *Type* parameter to the Lightweight Directory Access Protocol (LDAP) display name for the type of account you want to create.
51
+
To do this in Active Directory Domain Services (AD DS), set the _Type_ parameter to the Lightweight Directory Access Protocol (LDAP) display name for the type of account you want to create.
52
52
This type can be any class in the Active Directory schema that is a subclass of user and that has an object category of person.
53
53
54
-
The *Path* parameter specifies the container or organizational unit (OU) for the new user.
55
-
When you do not specify the *Path* parameter, the cmdlet creates a user object in the default container for user objects in the domain.
54
+
The _Path_ parameter specifies the container or organizational unit (OU) for the new user.
55
+
When you do not specify the _Path_ parameter, the cmdlet creates a user object in the default container for user objects in the domain.
56
56
57
57
The following methods explain different ways to create an object by using this cmdlet.
58
58
59
59
Method 1: Use the **New-ADUser** cmdlet, specify the required parameters, and set any additional property values by using the cmdlet parameters.
60
60
61
61
Method 2: Use a template to create the new object.
62
-
To do this, create a new user object or retrieve a copy of an existing user object and set the *Instance* parameter to this object.
63
-
The object provided to the *Instance* parameter is used as a template for the new object.
62
+
To do this, create a new user object or retrieve a copy of an existing user object and set the _Instance_ parameter to this object.
63
+
The object provided to the _Instance_ parameter is used as a template for the new object.
64
64
You can override property values from the template by setting cmdlet parameters.
65
-
For examples and more information, see the *Instance* parameter description for this cmdlet.
65
+
For examples and more information, see the _Instance_ parameter description for this cmdlet.
66
66
67
67
Method 3: Use the Import-Csv cmdlet with the **New-ADUser** cmdlet to create multiple Active Directory user objects.
68
68
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.
@@ -446,7 +446,7 @@ To specify this parameter, you can type a user name, such as User1 or Domain01\U
446
446
If you specify a user name for this parameter, the cmdlet prompts for a password.
447
447
448
448
You can also create a **PSCredential** object by using a script or by using the **Get-Credential** cmdlet.
449
-
You can then set the *Credential* parameter to the **PSCredential** object.
449
+
You can then set the _Credential_ parameter to the **PSCredential** object.
450
450
451
451
If the acting credentials do not have directory-level permission to perform the task, Active Directory PowerShell returns a terminating error.
452
452
@@ -749,11 +749,11 @@ You can construct a new user object using the Windows PowerShell command line or
749
749
750
750
Method 1: Use an existing user object as a template for a new object.
751
751
To retrieve an instance of an existing user object, use a cmdlet such as **Get-ADUser**.
752
-
Then provide this object to the *Instance* parameter of the **New-ADUser** cmdlet to create a new user object.
752
+
Then provide this object to the _Instance_ parameter of the **New-ADUser** cmdlet to create a new user object.
753
753
You can override property values of the new object by setting the appropriate parameters.
754
754
755
755
Method 2: Create a new **ADUser** object and set the property values by using the Windows PowerShell command line interface.
756
-
Then pass this object to the *Instance* parameter of the **New-ADUser** cmdlet to create the new Active Directory user object.
756
+
Then pass this object to the _Instance_ parameter of the **New-ADUser** cmdlet to create the new Active Directory user object.
757
757
758
758
Note: 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.
1051
1051
1052
-
In many cases, a default value is used for the *Path* parameter if no value is specified.
1052
+
In many cases, a default value is used for the _Path_ parameter if no value is specified.
1053
1053
The rules for determining the default value are given below.
1054
1054
Note that rules listed first are evaluated first and when a default value can be determined, no further rules are evaluated.
1055
1055
1056
-
In Active Directory Domain Services (AD DS) environments, a default value for *Path* is set in the following cases:
1056
+
In Active Directory Domain Services (AD DS) environments, a default value for _Path_ is set in the following cases:
1057
1057
1058
1058
- If the cmdlet is run from an Active Directory PowerShell provider drive, the parameter is set to the current path of the provider drive.
1059
1059
- If the cmdlet has a default path, this is used.
1060
-
For example: in New-ADUser, the *Path* parameter defaults to the Users container.
1061
-
- 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.
1060
+
For example: in New-ADUser, the _Path_ parameter defaults to the Users container.
1061
+
- 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.
1062
1062
1063
-
In AD LDS environments, a default value for *Path* is set in the following cases:
1063
+
In AD LDS environments, a default value for _Path_ is set in the following cases:
1064
1064
1065
1065
- 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.
1066
1066
- If the cmdlet has a default path, this is used.
1067
-
For example: in **New-ADUser**, the *Path* parameter defaults to the Users container.
1068
-
- If the target AD LDS instance has a default naming context, the default value of *Path* is set to the default naming context.
1067
+
For example: in **New-ADUser**, the _Path_ parameter defaults to the Users container.
1068
+
- If the target AD LDS instance has a default naming context, the default value of _Path_ is set to the default naming context.
1069
1069
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.
1070
-
- If none of the previous cases apply, the *Path* parameter does not take any default value.
1070
+
- If none of the previous cases apply, the _Path_ parameter does not take any default value.
1071
1071
1072
-
Note: The Active Directory Provider cmdlets, such New-Item, Remove-Item, Remove-ItemProperty, *Rename-Item*, and Set-ItemProperty also contain a *Path* property.
1073
-
However, for the Active Directory Provider cmdlets, the *Path* parameter identifies the path of the actual object rather than the container.
1072
+
Note: The Active Directory Provider cmdlets, such New-Item, Remove-Item, Remove-ItemProperty, *Rename-Item*, and Set-ItemProperty also contain a _Path_ property.
1073
+
However, for the Active Directory Provider cmdlets, the _Path_ parameter identifies the path of the actual object rather than the container.
1074
1074
1075
1075
```yaml
1076
1076
Type: String
@@ -1215,7 +1215,7 @@ Directory server values:
1215
1215
1216
1216
The default value for this parameter is determined by one of the following methods in the order that they are listed:
1217
1217
1218
-
- By using the *Server* value from objects passed through the pipeline
1218
+
- By using the _Server_ value from objects passed through the pipeline
1219
1219
- By using the server information associated with the AD DS Windows PowerShell provider drive, when the cmdlet runs in that drive
1220
1220
- By using the domain of the computer running Windows PowerShell
0 commit comments