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.
42
+
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
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
48
You must specify the _SamAccountName_ parameter to create a user.
49
49
50
-
You can use the **New-ADUser** cmdlet to create different types of user accounts such as iNetOrgPerson accounts.
50
+
You can use the `New-ADUser` cmdlet to create different types of user accounts such as iNetOrgPerson accounts.
51
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
@@ -56,17 +56,17 @@ When you do not specify the _Path_ parameter, the cmdlet creates a user object i
56
56
57
57
The following methods explain different ways to create an object by using this cmdlet.
58
58
59
-
Method 1: Use the **New-ADUser** cmdlet, specify the required parameters, and set any additional property values by using the cmdlet parameters.
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
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
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
65
For examples and more information, see the _Instance_ parameter description for this cmdlet.
66
66
67
-
Method 3: Use the Import-Csv cmdlet with the **New-ADUser** cmdlet to create multiple Active Directory user objects.
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.
69
-
Then pass these objects through the pipeline to the **New-ADUser** cmdlet to create the user objects.
67
+
Method 3: Use the Import-Csv cmdlet with the `New-ADUser` cmdlet to create multiple Active Directory user objects.
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.
69
+
Then pass these objects through the pipeline to the `New-ADUser` cmdlet to create the user objects.
Specifies whether an account supports Kerberos service tickets which includes the authorization data for the user's device.
383
-
This value sets the compound identity supported flag of the Active Directory **msDS-SupportedEncryptionTypes** attribute.
383
+
This value sets the compound identity supported flag of the Active Directory `msDS-SupportedEncryptionTypes` attribute.
384
384
The acceptable values for this parameter are:
385
385
386
386
- $False or 0
387
387
- $True or 1
388
388
389
-
Warning: Domain-joined Windows systems and services such as clustering manage their own **msDS-SupportedEncryptionTypes** attribute.
390
-
Therefore any changes to the flag on the **msDS-SupportedEncryptionTypes** attribute are overwritten by the service or system that manages the setting.
389
+
Warning: Domain-joined Windows systems and services such as clustering manage their own `msDS-SupportedEncryptionTypes` attribute.
390
+
Therefore any changes to the flag on the `msDS-SupportedEncryptionTypes` attribute are overwritten by the service or system that manages the setting.
391
391
392
392
```yaml
393
393
Type: Boolean
@@ -445,7 +445,7 @@ If the cmdlet is run from such a provider drive, the account associated with the
445
445
To specify this parameter, you can type a user name, such as User1 or Domain01\User01 or you can specify a **PSCredential** object.
446
446
If you specify a user name for this parameter, the cmdlet prompts for a password.
447
447
448
-
You can also create a **PSCredential** object by using a script or by using the **Get-Credential** cmdlet.
448
+
You can also create a **PSCredential** object by using a script or by using the `Get-Credential` cmdlet.
449
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.
@@ -748,12 +748,12 @@ You can use an instance of an existing user object as a template or you can cons
748
748
You can construct a new user object using the Windows PowerShell command line or by using a script.
749
749
750
750
Method 1: Use an existing user object as a template for a new object.
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.
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.
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 whether an account supports Kerberos encryption types which are used during creation of service tickets.
775
-
This value sets the encryption types supported flags of the Active Directory **msDS-SupportedEncryptionTypes** attribute.
775
+
This value sets the encryption types supported flags of the Active Directory `msDS-SupportedEncryptionTypes` attribute.
776
776
Possible values for this parameter are:
777
777
778
778
- None
@@ -785,8 +785,8 @@ None removes all encryption types from the account, resulting in the KDC being u
785
785
786
786
DES is a weak encryption type that is not supported by default since Windows 7 and Windows Server 2008 R2.
787
787
788
-
Warning: Domain-joined Windows systems and services such as clustering manage their own **msDS-SupportedEncryptionTypes** attribute.
789
-
Therefore any changes to the flag on the **msDS-SupportedEncryptionTypes** attribute are overwritten by the service or system that manages the setting.
788
+
Warning: Domain-joined Windows systems and services such as clustering manage their own `msDS-SupportedEncryptionTypes` attribute.
789
+
Therefore any changes to the flag on the `msDS-SupportedEncryptionTypes` attribute are overwritten by the service or system that manages the setting.
790
790
791
791
```yaml
792
792
Type: ADKerberosEncryptionType
@@ -1064,9 +1064,9 @@ 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.
1067
+
For example: in `New-ADUser`, the _Path_ parameter defaults to the Users container.
1068
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
-
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.
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
1070
- If none of the previous cases apply, the _Path_ parameter does not take any default value.
1071
1071
1072
1072
Note: The Active Directory Provider cmdlets, such New-Item, Remove-Item, Remove-ItemProperty, *Rename-Item*, and Set-ItemProperty also contain a _Path_ property.
0 commit comments