Skip to content

Commit

Permalink
Update Get-TssFolder.ps1
Browse files Browse the repository at this point in the history
Fix for the Bug thycotic-ps#409
  • Loading branch information
gaurava-delinea authored Nov 29, 2024
1 parent 7a78615 commit 37315c6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/functions/folders/Get-TssFolder.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ function Get-TssFolder {
}

if ($restResponse) {
[Thycotic.PowerShell.Folders.Folder[]]$restResponse
$restResponse | ForEach-Object {
$NonEmptyProperties = $_.restResponse.Properties | Where-Object {$_.Value} | Select-Object -ExpandProperty Name
$_ | Select-Object -Property $NonEmptyProperties
}
[Thycotic.PowerShell.Folders.Folder[]]$NonEmptyProperties
}
}
}
Expand All @@ -129,12 +133,16 @@ function Get-TssFolder {
}

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

0 comments on commit 37315c6

Please sign in to comment.