File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
docset/winserver2022-ps/activedirectory Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -79,15 +79,15 @@ through the pipeline to the `New-ADUser` cmdlet to create the user objects.
7979### Example 1: Create a user with an imported certificate
8080
8181``` powershell
82- PS C:\> New-ADUser -Name "ChewDavid" -Certificate (New-Object System.Security.Cryptography.X509Certificates.X509Certificate -ArgumentList "Export.cer")
82+ New-ADUser -Name "ChewDavid" -Certificate (New-Object System.Security.Cryptography.X509Certificates.X509Certificate -ArgumentList "Export.cer")
8383```
8484
8585This command creates a user named ChewDavid with a certificate imported from the file Export.cer.
8686
8787### Example 2: Create a user and set properties
8888
8989``` powershell
90- PS C:\> New-ADUser -Name "ChewDavid" -OtherAttributes @{'title'="director";'mail'="[email protected] "}90+ New-ADUser -Name "ChewDavid" -OtherAttributes @{'title'="director";'mail'="[email protected] "} 9191```
9292
9393This command creates a new user named ChewDavid and sets the ** title** and ** mail** properties on
@@ -96,15 +96,15 @@ the new object.
9696### Example 3: Create an inetOrgPerson user
9797
9898``` powershell
99- PS C:\> New-ADUser -Name "ChewDavid" -Type iNetOrgPerson -Path "DC=AppNC" -Server lds.Fabrikam.com:50000
99+ New-ADUser -Name "ChewDavid" -Type iNetOrgPerson -Path "DC=AppNC" -Server lds.Fabrikam.com:50000
100100```
101101
102102This command creates an ** inetOrgPerson** -class user named ChewDavid on an AD LDS instance.
103103
104104### Example 4: Create a user and set password
105105
106106``` powershell
107- PS C:\> New-ADUser -Name "ChewDavid" -Accountpassword (Read-Host -AsSecureString "AccountPassword") -Enabled $true
107+ New-ADUser -Name "ChewDavid" -Accountpassword (Read-Host -AsSecureString "AccountPassword") -Enabled $true
108108```
109109
110110This command creates a new user named ChewDavid and sets the account password.
You can’t perform that action at this time.
0 commit comments