Skip to content

Commit

Permalink
Search-TssMetadata - correction/updates to parameter type and help
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Aug 16, 2021
1 parent 64749a1 commit 028c4f2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
12 changes: 10 additions & 2 deletions docs/commands/diagnostics/Search-TssSystemLog.md
Expand Up @@ -23,6 +23,14 @@ Search-TssSystemLog -TssSession $session -SearchText "powershell"

Return Log messages matching the text "powershell"

### EXAMPLE 2
```
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
Search-TssSystemLog -TssSession $session -SearchText "Azure AD"
```

Return Log messages matching the text "Azure AD"

## PARAMETERS

### -TssSession
Expand Down Expand Up @@ -72,7 +80,7 @@ Accept wildcard characters: False
```

### -SortBy
Sort by specific property, default SystemLogName
Sort by specific property, default DateRecorded

```yaml
Type: String
Expand All @@ -81,7 +89,7 @@ Aliases:

Required: False
Position: Named
Default value: SystemLogName
Default value: DateRecorded
Accept pipeline input: False
Accept wildcard characters: False
```
Expand Down
11 changes: 6 additions & 5 deletions docs/commands/metadata/Search-TssMetadata.md
Expand Up @@ -7,7 +7,7 @@ Search metadata

### item
```
Search-TssMetadata [-TssSession] <Session> -ItemId <Int32> -Type <String> [-SortBy <String>]
Search-TssMetadata [-TssSession] <Session> -ItemId <Int32> -Type <MetadataType> [-SortBy <String>]
[<CommonParameters>]
```

Expand Down Expand Up @@ -44,12 +44,12 @@ Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept pipeline input: False
Accept wildcard characters: False
```

### -ItemId
Item ID to return metadata (Secret, Group, User, etc.)
Item ID to return metadata

```yaml
Type: Int32
Expand Down Expand Up @@ -82,9 +82,10 @@ Accept wildcard characters: False
Metadata Type (Secret, User, Folder, Group)

```yaml
Type: String
Type: MetadataType
Parameter Sets: item
Aliases:
Aliases: MetadataType
Accepted values: Secret, User, Folder, Group

Required: True
Position: Named
Expand Down
3 changes: 2 additions & 1 deletion src/Thycotic.SecretServer/classes/metadata/Summary.cs
Expand Up @@ -2,6 +2,7 @@
using System.Threading.Tasks;
using System.Management.Automation;
using System.Management.Automation.Runspaces;
using Thycotic.PowerShell.Enums;

namespace Thycotic.PowerShell.Metadata
{
Expand All @@ -19,7 +20,7 @@ public class Summary
public string MetadataFieldSectionName { get; set; }
public string MetadataFieldTypeName { get; set; }
public int MetadataItemDataId { get; set; }
public string MetadataType { get; set; }
public MetadataType MetadataType { get; set; }
public string MetadataTypeName { get; set; }
public int SortOrder { get; set; }
public bool ValueBit { get; set; }
Expand Down
8 changes: 4 additions & 4 deletions src/functions/metadata/Search-TssMetadata.ps1
Expand Up @@ -27,11 +27,11 @@ function Search-TssMetadata {
[OutputType('Thycotic.PowerShell.Metadata.Summary')]
param (
# TssSession object created by New-TssSession for authentication
[Parameter(Mandatory,ValueFromPipeline,Position = 0)]
[Parameter(Mandatory, Position = 0)]
[Thycotic.PowerShell.Authentication.Session]
$TssSession,

# Item ID to return metadata (Secret, Group, User, etc.)
# Item ID to return metadata
[Parameter(Mandatory, ParameterSetName = 'item')]
[int]
$ItemId,
Expand All @@ -43,8 +43,8 @@ function Search-TssMetadata {

# Metadata Type (Secret, User, Folder, Group)
[Parameter(Mandatory, ParameterSetName = 'item')]
[ValidateSet('Secret','User','Folder','Group')]
[string]
[Alias('MetadataType')]
[Thycotic.PowerShell.Enums.MetadataType]
$Type,

# Sort by specific property, default ItemId
Expand Down

0 comments on commit 028c4f2

Please sign in to comment.