Skip to content

Commit d12059f

Browse files
committed
decorating code blocks
1 parent 9fde678 commit d12059f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Creates an Active Directory user.
1616

1717
## SYNTAX
1818

19-
```
19+
```powershell
2020
New-ADUser [-WhatIf] [-Confirm] [-AccountExpirationDate <DateTime>] [-AccountNotDelegated <Boolean>]
2121
[-AccountPassword <SecureString>] [-AllowReversiblePasswordEncryption <Boolean>]
2222
[-AuthenticationPolicy <ADAuthenticationPolicy>] [-AuthenticationPolicySilo <ADAuthenticationPolicySilo>]
@@ -78,15 +78,15 @@ through the pipeline to the `New-ADUser` cmdlet to create the user objects.
7878

7979
### Example 1: Create a user with an imported certificate
8080

81-
```
81+
```powershell
8282
PS C:\> New-ADUser -Name "ChewDavid" -Certificate (New-Object System.Security.Cryptography.X509Certificates.X509Certificate -ArgumentList "Export.cer")
8383
```
8484

8585
This 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

89-
```
89+
```powershell
9090
PS C:\> New-ADUser -Name "ChewDavid" -OtherAttributes @{'title'="director";'mail'="[email protected]"}
9191
```
9292

@@ -95,15 +95,15 @@ the new object.
9595

9696
### Example 3: Create an inetOrgPerson user
9797

98-
```
98+
```powershell
9999
PS C:\> New-ADUser -Name "ChewDavid" -Type iNetOrgPerson -Path "DC=AppNC" -Server lds.Fabrikam.com:50000
100100
```
101101

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

104104
### Example 4: Create a user and set password
105105

106-
```
106+
```powershell
107107
PS C:\> New-ADUser -Name "ChewDavid" -Accountpassword (Read-Host -AsSecureString "AccountPassword") -Enabled $true
108108
```
109109

0 commit comments

Comments
 (0)