diff --git a/docs/collections/_commands/Add-TssSecretTemplateField.md b/docs/collections/_commands/Add-TssSecretTemplateField.md new file mode 100644 index 00000000..a963bef3 --- /dev/null +++ b/docs/collections/_commands/Add-TssSecretTemplateField.md @@ -0,0 +1,132 @@ +--- +category: secrets +external help file: Thycotic.SecretServer-help.xml +Module Name: Thycotic.SecretServer +online version: https://thycotic-ps.github.io/thycotic.secretserver/commands/Add-TssSecretTemplateField +schema: 2.0.0 +title: Add-TssSecretTemplateField +--- + +# Add-TssSecretTemplateField + +## SYNOPSIS +Add a new field to a Secret Template + +## SYNTAX + +``` +Add-TssSecretTemplateField [-TssSession] [-Id] [-Field] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Add a new field to a Secret Template + +## EXAMPLES + +### EXAMPLE 1 +``` +$session = New-TssSession 'https://alpha/SecretServer' $ssCred +(Get-TssSecretTemplate -TssSession $session -Id 6042).Fields +$newField = New-TssSecretTemplateField -FieldName 'Additional Field' -Searchable +Add-TssSecretTemplateField -TssSession $session -Id 6042 -Field $newField +(Get-TssSecretTemplate -TssSession $session -Id 6042).Fields +``` + +Output the current fields for Secret Template 6042, create a new field named "Additional Field" that is searchable and add to the Secret Template 6042 + +## PARAMETERS + +### -TssSession +TssSession object created by New-TssSession for auth + +```yaml +Type: TssSession +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Id +Template Stub object + +```yaml +Type: Int32[] +Parameter Sets: (All) +Aliases: TemplateId + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Field +Fields, use New-TssSecretTemplateField to build this object + +```yaml +Type: TssSecretTemplateField +Parameter Sets: (All) +Aliases: + +Required: True +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### TssSecretTemplate +## NOTES +Requires TssSession object returned by New-TssSession + +## RELATED LINKS + +[https://thycotic-ps.github.io/thycotic.secretserver/commands/Add-TssSecretTemplateField](https://thycotic-ps.github.io/thycotic.secretserver/commands/Add-TssSecretTemplateField) + +[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/secret-templates/Add-SecretTemplateField](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/secret-templates/Add-SecretTemplateField) + diff --git a/docs/collections/_commands/Get-TssGroupMember.md b/docs/collections/_commands/Get-TssGroupMember.md index 7b4adbff..b9e3bc75 100644 --- a/docs/collections/_commands/Get-TssGroupMember.md +++ b/docs/collections/_commands/Get-TssGroupMember.md @@ -124,5 +124,5 @@ Requires TssSession object returned by New-TssSession [https://thycotic-ps.github.io/thycotic.secretserver/commands/Get-TssGroupMember](https://thycotic-ps.github.io/thycotic.secretserver/commands/Get-TssGroupMember) -[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//Get-GroupMember.ps1](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//Get-GroupMember.ps1) +[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/groups/Get-GroupMember.ps1](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/groups/Get-GroupMember.ps1) diff --git a/docs/collections/_commands/New-TssSecretTemplate.md b/docs/collections/_commands/New-TssSecretTemplate.md index 08a82814..63e8cab6 100644 --- a/docs/collections/_commands/New-TssSecretTemplate.md +++ b/docs/collections/_commands/New-TssSecretTemplate.md @@ -14,22 +14,44 @@ Create a new Secret Template ## SYNTAX +### newcopy ``` -New-TssSecretTemplate [-TssSession] [-Template] [-WhatIf] [-Confirm] +New-TssSecretTemplate [-TssSession] -Template [-WhatIf] [-Confirm] [] ``` +### new +``` +New-TssSecretTemplate [-TssSession] -TemplateName + -TemplateField [-WhatIf] [-Confirm] [] +``` + ## DESCRIPTION Create a new Secret Template ## EXAMPLES -### Example 1 -```powershell -PS C:\> {{ Add example code here }} +### EXAMPLE 1 +``` +$session = New-TssSession 'https://alpha/SecretServer' $ssCred +$copyTemplate = Get-TssSecretTemplate -TssSession $session -Id 6042 +$copyTemplate.Name = 'Test Template - copy of 6042' +New-TssSecretTemplate -TssSession $session -Template $copyTemplate +``` + +Gets the Secret Template 6042, changing the name of the Template and then creating it + +### EXAMPLE 2 +``` +$session = New-TssSession 'https://alpha/SecretServer' $ssCred +$fields = @() +$fields += New-TssSecretTemplateField -FieldName 'Field 1 Username' -Searchable +$fields += New-TssSecretTemplateField -FieldName 'Field 2 Password' -Type Password +$fields += New-TssSecretTemplateField -FieldName 'Field 3 URL' -Type Url -Searchable +New-TssSecretTemplate -TssSession $session -TemplateName 'Test Template 42' -TemplateField $fields ``` -{{ Add example description here }} +Creates a new template named "Test Template 42" with 3 fields ## PARAMETERS @@ -53,16 +75,46 @@ Template Stub object ```yaml Type: TssSecretTemplate -Parameter Sets: (All) +Parameter Sets: newcopy Aliases: TemplateStub Required: True -Position: 2 +Position: Named Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` +### -TemplateName +Template Name + +```yaml +Type: String +Parameter Sets: new +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TemplateField +Fields, use New-TssSecretTemplateField to build this object + +```yaml +Type: TssSecretTemplateField[] +Parameter Sets: new +Aliases: Fields + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -WhatIf Shows what would happen if the cmdlet runs. The cmdlet is not run. @@ -109,5 +161,5 @@ Requires TssSession object returned by New-TssSession [https://thycotic-ps.github.io/thycotic.secretserver/commands/New-TssSecretTemplate](https://thycotic-ps.github.io/thycotic.secretserver/commands/New-TssSecretTemplate) -[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//New-SecretTemplate.ps1](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//New-SecretTemplate.ps1) +[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/secret-templates/New-SecretTemplate.ps1](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/secret-templates/New-SecretTemplate.ps1) diff --git a/docs/collections/_commands/New-TssSecretTemplateField.md b/docs/collections/_commands/New-TssSecretTemplateField.md new file mode 100644 index 00000000..87559964 --- /dev/null +++ b/docs/collections/_commands/New-TssSecretTemplateField.md @@ -0,0 +1,229 @@ +--- +category: secrets +external help file: Thycotic.SecretServer-help.xml +Module Name: Thycotic.SecretServer +online version: https://thycotic-ps.github.io/thycotic.secretserver/commands/Set-TssSecretTemplateStubField +schema: 2.0.0 +title: New-TssSecretTemplateField +--- + +# New-TssSecretTemplateField + +## SYNOPSIS +Create a new field object for the TssSecretTemplate object + +## SYNTAX + +``` +New-TssSecretTemplateField [-FieldName] [-Type ] [-EditRequire ] + [-Description ] [-IsRequired] [-ViewRequiresEdit] [-HistoryLength ] [-Searchable] + [-ExposeForDisplay] [-SortOrder ] [] +``` + +## DESCRIPTION +Create a new field object for the TssSecretTemplate object + +## EXAMPLES + +### EXAMPLE 1 +``` +$session = New-TssSession 'https://alpha/SecretServer' $ssCred +(Get-TssSecretTemplate -TssSession $session -Id 6042).Fields +$newField = New-TssSecretTemplateField -FieldName 'Additional Field' -Searchable +Add-TssSecretTemplateField -TssSession $session -Id 6042 -Field $newField +(Get-TssSecretTemplate -TssSession $session -Id 6042).Fields +``` + +Output the current fields for Secret Template 6042, create a new field named "Additional Field" that is searchable and add to the Secret Template 6042 + +### EXAMPLE 2 +``` +$session = New-TssSession 'https://alpha/SecretServer' $ssCred +$copyTemplate = Get-TssSecretTemplate -TssSession $session -Id 6042 +$copyTemplate.Name = 'Test Template - copy of 6042' +New-TssSecretTemplate -TssSession $session -Template $copyTemplate +``` + +Gets the Secret Template 6042, changing the name of the Template and then creating it. + +### EXAMPLE 3 +``` +$session = New-TssSession 'https://alpha/SecretServer' $ssCred +$fields = @() +$fields += New-TssSecretTemplateField -FieldName 'Field 1 Username' -Searchable +$fields += New-TssSecretTemplateField -FieldName 'Field 2 Password' -Type Password +$fields += New-TssSecretTemplateField -FieldName 'Field 3 URL' -Type Url -Searchable +New-TssSecretTemplate -TssSession $session -TemplateName 'Test Template 42' -TemplateField $fields +``` + +Creates a new template named "Test Template 42" with 3 fields + +## PARAMETERS + +### -FieldName +Field Name - value used for DisplayName, Name, and Slug Name + +```yaml +Type: String +Parameter Sets: (All) +Aliases: Field + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Type +Field Type: Notes, Text, File, Url, or Password + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: Text +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EditRequire +Edit permission: Owner, Edit, NotEditable + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: Edit +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Field description, defaults to null + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsRequired +Field is required + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ViewRequiresEdit +Viewing requires edit (HideOnView) + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HistoryLength +History length for the field, defaults to max (All) + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 2147483647 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Searchable +Field values are searchable (IsIndexable) + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExposeForDisplay +Field is exposed for display (not encrypted) + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SortOrder +Field order + +```yaml +Type: Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### TssSecretTemplateField +## NOTES +Requires TssSession object returned by New-TssSession + +## RELATED LINKS + +[https://thycotic-ps.github.io/thycotic.secretserver/commands/Set-TssSecretTemplateStubField](https://thycotic-ps.github.io/thycotic.secretserver/commands/Set-TssSecretTemplateStubField) + +[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/secret-templates/Set-SecretTemplateStubField.ps1](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/secret-templates/Set-SecretTemplateStubField.ps1) + diff --git a/docs/collections/_commands/New-TssUser.md b/docs/collections/_commands/New-TssUser.md index 34e5434d..abde8ffd 100644 --- a/docs/collections/_commands/New-TssUser.md +++ b/docs/collections/_commands/New-TssUser.md @@ -254,5 +254,5 @@ Requires TssSession object returned by New-TssSession [https://thycotic-ps.github.io/thycotic.secretserver/commands/New-TssUser](https://thycotic-ps.github.io/thycotic.secretserver/commands/New-TssUser) -[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//New-User.ps1](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//New-User.ps1) +[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/users/New-User.ps1](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/users/New-User.ps1) diff --git a/docs/collections/_commands/Set-TssSecretSecurity.md b/docs/collections/_commands/Set-TssSecretSecurity.md index c2ffa047..cf72afd3 100644 --- a/docs/collections/_commands/Set-TssSecretSecurity.md +++ b/docs/collections/_commands/Set-TssSecretSecurity.md @@ -200,5 +200,5 @@ Requires TssSession object returned by New-TssSession [https://thycotic-ps.github.io/thycotic.secretserver/commands/Set-TssSecretSecurity](https://thycotic-ps.github.io/thycotic.secretserver/commands/Set-TssSecretSecurity) -[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//Set-SecretSecurity.ps1](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//Set-SecretSecurity.ps1) +[https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/secrets/Set-SecretSecurity.ps1](https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/secrets/Set-SecretSecurity.ps1) diff --git a/src/functions/groups/Get-GroupMember.ps1 b/src/functions/groups/Get-GroupMember.ps1 index 5a1b8ab6..3dc3368f 100644 --- a/src/functions/groups/Get-GroupMember.ps1 +++ b/src/functions/groups/Get-GroupMember.ps1 @@ -16,7 +16,7 @@ function Get-GroupMember { https://thycotic-ps.github.io/thycotic.secretserver/commands/Get-TssGroupMember .LINK - https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//Get-GroupMember.ps1 + https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/groups/Get-GroupMember.ps1 .NOTES Requires TssSession object returned by New-TssSession diff --git a/src/functions/secrets/Set-SecretSecurity.ps1 b/src/functions/secrets/Set-SecretSecurity.ps1 index bcb51e0f..fea47932 100644 --- a/src/functions/secrets/Set-SecretSecurity.ps1 +++ b/src/functions/secrets/Set-SecretSecurity.ps1 @@ -16,7 +16,7 @@ function Set-SecretSecurity { https://thycotic-ps.github.io/thycotic.secretserver/commands/Set-TssSecretSecurity .LINK - https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//Set-SecretSecurity.ps1 + https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/secrets/Set-SecretSecurity.ps1 .NOTES Requires TssSession object returned by New-TssSession diff --git a/src/functions/users/New-User.ps1 b/src/functions/users/New-User.ps1 index b2b79761..942ada4c 100644 --- a/src/functions/users/New-User.ps1 +++ b/src/functions/users/New-User.ps1 @@ -22,7 +22,7 @@ function New-User { https://thycotic-ps.github.io/thycotic.secretserver/commands/New-TssUser .LINK - https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions//New-User.ps1 + https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/users/New-User.ps1 .NOTES Requires TssSession object returned by New-TssSession