Skip to content

Commit fef21d0

Browse files
authored
Update New-ADUser.md
Added another example using account password and Enabled parameter
1 parent c2dede3 commit fef21d0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docset/winserver2019-ps/activedirectory/New-ADUser.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ PS C:\> New-ADUser -Name "ChewDavid" -Type iNetOrgPerson -Path "DC=AppNC" -Serve
8989

9090
This command creates an **inetOrgPerson**-class user named ChewDavid on an AD LDS instance.
9191

92+
### Example 4: Create a user and set password
93+
```
94+
PS C:\> New-ADUser -Name "ChewDavid" -Accountpassword (Read-Host -AsSecureString "AccountPassword") -Enabled $true
95+
```
96+
97+
This command creates a new user named ChewDavid and sets the account password.
98+
9299
## PARAMETERS
93100

94101
### -AccountExpirationDate

0 commit comments

Comments
 (0)