Skip to content

Commit

Permalink
doc - update commands
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Apr 4, 2021
1 parent 20a97d3 commit 4a11a5d
Show file tree
Hide file tree
Showing 5 changed files with 288 additions and 46 deletions.
13 changes: 7 additions & 6 deletions docs/collections/_commands/Get-TssSecret.md
Expand Up @@ -51,22 +51,23 @@ Returns secret associated with the Secret ID, 1723, providing required comment
```
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
$secret = Get-TssSecret -TssSession $session -Id 46
$cred = $secret.GetCredential()
$cred = $secret.GetCredential('domain','username','password')
```

Gets Secret ID 46 and then output a PSCredential to utilize in script workflow
Gets Secret ID 46 (Active Directory template).
Call GetCredential providing slug names for desired fields to get a PSCredential object

### EXAMPLE 4
```
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
$secret = Search-TssSecret -TssSession $session -FieldSlug server -FieldText 'sql1' | Get-TssSecret
$cred = $secret.GetCredential()
$cred = $secret.GetCredential($null,'username','password')
$serverName = $secret.GetValue('server')
```

Search for the secret with server value of sql1 and pull the secret details
Call GetCredential() method to get the PSCredential object with the username and password
Call GetValue() method passing the slug name to grab the ItemValue of the server field.
Search for the secret with server value of sql1 and pull the secret details.
Call GetCredential() method, only needing the username and password values for the PSCredential object.
Call GetValue() method to get the 'server' value.

## PARAMETERS

Expand Down
2 changes: 1 addition & 1 deletion docs/collections/_commands/Get-TssUserRole.md
Expand Up @@ -54,7 +54,7 @@ Short description for parameter
```yaml
Type: Int32[]
Parameter Sets: (All)
Aliases: UserRoleId
Aliases: UserId

Required: True
Position: Named
Expand Down
95 changes: 74 additions & 21 deletions docs/collections/_commands/New-TssFolder.md
Expand Up @@ -15,7 +15,9 @@ Create a new folder
## SYNTAX

```
New-TssFolder [-TssSession] <TssSession> [-FolderStub] <TssFolder> [-WhatIf] [-Confirm] [<CommonParameters>]
New-TssFolder [-TssSession] <TssSession> -FolderName <String> [-ParentFolderId <Int32>]
[-SecretPolicyId <Int32>] [-InheritPermissions] [-InheritSecretPolicy] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

## DESCRIPTION
Expand All @@ -27,36 +29,27 @@ Create a new folder
```
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
$folderStub = Get-TssFolderStub -TssSession $session
$folderStub.FolderName = 'tssNewFolder'
$folderStub.ParentFolderId = -1
New-TssFolder -TssSession $session -FolderStub $folderStub
New-TssFolder -TssSession $session -FolderStub $folderStub -FolderName 'tssNewFolder' -ParentFolderId -1
```

Creates a new root folder, named "tssNewFolder"
Creates a folder named "tssNewFolder" at the root of Secret Server application

### EXAMPLE 2
```
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
$folderStub = Get-TssFolderStub -TssSession $session
$folderStub.FolderName 'IT Dept'
$folderStub.ParentFolderId = 27
$folderStub.InheritPermissions = $false
New-TssFolder -TssSession $session -FolderStub $folderStub
New-TssFolder -TssSession $session -FolderStub $folderStub -FolderName 'IT Dept' -ParentFolderId 27 -InheritPermissions:$false
```

Creates a folder named "IT Dept" under parent folder 27 with Inherit Permissins disabled
Creates a folder named "IT Dept" under parent folder 27 with Inherit Permissins disabled (set to No if viewed in the UI)

### EXAMPLE 3
```
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
$folderStub.FolderName 'Marketing Dept'
$folderStub.ParentFolderId = 27
$folderStub.InheritPermissions = $true
$folderStub.InheritSecretPolicy = $true
New-TssFolder -TssSession $session -FolderStub $folderStub
Get-TssFolderStub -TssSession $session | New-TssFolder -TssSession $session -FolderName 'Marketing Dept' -ParentFolderId 27 -InheritPermissions -InheritSecretPolicy
```

Creates a folder named "Marketing Dept" under parent folder 27 with Inheritance enabled for Permissions and Secret Policy
Creates a folder named "Marketing Dept" under parent folder 27 with inheritance enabled for Permissions and Secret Policy

## PARAMETERS

Expand All @@ -75,18 +68,78 @@ Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -FolderStub
Input object obtained via Get-TssFolderStub
### -FolderName
Folder Name

```yaml
Type: TssFolder
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept pipeline input: False
Accept wildcard characters: False
```

### -ParentFolderId
Parent Folder ID, default to root folder (-1)

```yaml
Type: Int32
Parameter Sets: (All)
Aliases: ParentFolder

Required: False
Position: Named
Default value: -1
Accept pipeline input: False
Accept wildcard characters: False
```

### -SecretPolicyId
Secret Policy ID

```yaml
Type: Int32
Parameter Sets: (All)
Aliases: SecretPolicy

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```

### -InheritPermissions
Inherit Permissions

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -InheritSecretPolicy
Inherit Secret Policy

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

Expand Down
20 changes: 2 additions & 18 deletions docs/collections/_commands/Set-TssSecret.md
Expand Up @@ -20,8 +20,7 @@ Set-TssSecret [-TssSession] <TssSession> -Id <Int32[]> [-Comment <String>] [-For
[-TicketNumber <Int32>] [-TicketSystemId <Int32>] [-Active] [-AutoChangeEnabled]
[-AutoChangeNextPassword <SecureString>] [-EnableInheritPermission] [-EnableInheritSecretPolicy]
[-FolderId <Int32>] [-GenerateSshKeys] [-HeartbeatEnabled] [-IsOutOfSync] [-SecretName <String>]
[-SecretPolicy <Int32>] [-Site <Int32>] [-Template <Int32>] [-CheckIn] [-WhatIf] [-Confirm]
[<CommonParameters>]
[-SecretPolicy <Int32>] [-Site <Int32>] [-CheckIn] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### restricted
Expand All @@ -40,7 +39,7 @@ Set-TssSecret [-TssSession] <TssSession> -Id <Int32[]> [-ForceCheckIn] [-CheckIn
```
Set-TssSecret [-TssSession] <TssSession> -Id <Int32[]> [-Active] [-EnableInheritSecretPolicy]
[-FolderId <Int32>] [-GenerateSshKeys] [-HeartbeatEnabled] [-IsOutOfSync] [-SecretName <String>]
[-SecretPolicy <Int32>] [-Site <Int32>] [-Template <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
[-SecretPolicy <Int32>] [-Site <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

### password
Expand Down Expand Up @@ -342,21 +341,6 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Template
Secret Template (ID)

```yaml
Type: Int32
Parameter Sets: all, general
Aliases: TemplateId

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```

### -CheckIn
Check-In a Secret, can be combined with ForceCheckIn to forcibly check the Secret in

Expand Down

0 comments on commit 4a11a5d

Please sign in to comment.