Skip to content

Commit

Permalink
Fix detection of Policy for Set-TppAttribute (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilddev65 authored Sep 29, 2022
1 parent f7b8653 commit 2ef2ef1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion VenafiPS/Public/Add-TppAdaptableHash.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function Add-TppAdaptableHash {
Write-Error ("Error adding VaultID: {0}" -f [enum]::GetName([TppSecretStoreResult], $addResponse.Result)) -ErrorAction Stop
}

if ( $AdaptableApp ) {
if ( $TypeName -eq 'Policy' ) {
Set-TppAttribute -Path $Path -PolicyClass 'Adaptable App' -Attribute @{ 'PowerShell Script Hash Vault Id' = [string]$addresponse.VaultID } -Lock -VenafiSession $VenafiSession -ErrorAction Stop
} else {
Set-TppAttribute -Path $Path -Attribute @{ 'PowerShell Script Hash Vault Id' = [string]$addresponse.VaultID } -VenafiSession $VenafiSession -ErrorAction Stop
Expand Down

0 comments on commit 2ef2ef1

Please sign in to comment.