Skip to content

Commit

Permalink
Update Get-TssSecretTemplate.ps1
Browse files Browse the repository at this point in the history
Fix for the bug 
thycotic-ps#410
  • Loading branch information
gaurava-delinea authored Nov 29, 2024
1 parent 7a78615 commit a308ccf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/functions/secret-templates/Get-TssSecretTemplate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,15 @@ function Get-TssSecretTemplate {
}

if ($restResponse) {
[Thycotic.PowerShell.SecretTemplates.Template]$restResponse
$restResponse | ForEach-Object {
$NonEmptyProperties = $_.restResponse.Properties | Where-Object {$_.Value} | Select-Object -ExpandProperty Name
$_ | Select-Object -Property $NonEmptyProperties
}
[Thycotic.PowerShell.SecretTemplates.Template]$NonEmptyProperties
}
}
} else {
Write-Warning 'No valid session found'
}
}
}
}

0 comments on commit a308ccf

Please sign in to comment.