Skip to content

Commit

Permalink
New-TssUser - add examples fixes #160
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Apr 18, 2021
1 parent 09ccb74 commit 400ac84
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
19 changes: 14 additions & 5 deletions docs/collections/_commands/New-TssUser.md
Expand Up @@ -25,12 +25,21 @@ Create a new Secret Server User

## EXAMPLES

### Example 1
```powershell
PS C:\> {{ Add example code here }}
### EXAMPLE 1
```
$session = New-TssSession -SecretServer https://alpha/SecretServer -Credential $ssCred
New-TssUser -TssSession $session -Username 'testuser' -DisplayName 'My Test User' -Password (ConvertTo-SecureString 'pass!' -AsPlainText -Force) -Active
```

Create testuser with a DisplayName of "My Test User", and enable on creation.

### EXAMPLE 2
```
$session = New-TssSession -SecretServer https://alpha/SecretServer -Credential $ssCred
New-TssUser -TssSession $session -Username 'apiuser' -DisplayName 'Dev Test App User' -Password (ConvertTo-SecureString 'pass$' -AsPlainText -Force) -IsApplicationAccount -Active
```

{{ Add example description here }}
Create apiuser as an Application Account and enable on creation.

## PARAMETERS

Expand Down Expand Up @@ -185,7 +194,7 @@ Accept wildcard characters: False
```

### -RadiusUsername
{{ Fill RadiusUsername Description }}
Username for RADIUS

```yaml
Type: String
Expand Down
13 changes: 13 additions & 0 deletions src/functions/users/New-User.ps1
Expand Up @@ -6,6 +6,18 @@ function New-User {
.DESCRIPTION
Create a new Secret Server User
.EXAMPLE
$session = New-TssSession -SecretServer https://alpha/SecretServer -Credential $ssCred
New-TssUser -TssSession $session -Username 'testuser' -DisplayName 'My Test User' -Password (ConvertTo-SecureString 'pass!' -AsPlainText -Force) -Active
Create testuser with a DisplayName of "My Test User", and enable on creation.
.EXAMPLE
$session = New-TssSession -SecretServer https://alpha/SecretServer -Credential $ssCred
New-TssUser -TssSession $session -Username 'apiuser' -DisplayName 'Dev Test App User' -Password (ConvertTo-SecureString 'pass$' -AsPlainText -Force) -IsApplicationAccount -Active
Create apiuser as an Application Account and enable on creation.
.LINK
https://thycotic-ps.github.io/thycotic.secretserver/commands/New-TssUser
Expand Down Expand Up @@ -65,6 +77,7 @@ function New-User {
[string]
$TwoFactorType,

# Username for RADIUS
[string]
$RadiusUsername
)
Expand Down

0 comments on commit 400ac84

Please sign in to comment.