Updated ConvertFrom-GraylogSession to properly parse the Cookies

This commit is contained in:
Nathan Windisch 2024-07-26 13:54:54 +01:00
parent 13d01d9eb1
commit 9f7ce2c8b0

View File

@ -35,7 +35,8 @@ function ConvertFrom-GraylogSession {
# MaximumRetryCount = $InputObject.MaximumRetryCount # MaximumRetryCount = $InputObject.MaximumRetryCount
# RetryIntervalInSeconds = $InputObject.RetryIntervalInSeconds # RetryIntervalInSeconds = $InputObject.RetryIntervalInSeconds
# } # }
$Output = $InputObject $Output = $InputObject | Select-Object -ExcludeProperty Cookies
$Output | Add-Member -MemberType NoteProperty -Name Cookies -Value ([Collections.Generic.List[PSCustomObject]]@())
if ($InputObject.Cookies.Count) { if ($InputObject.Cookies.Count) {
# GetAllCookies is only available in PowerShell Core :c # GetAllCookies is only available in PowerShell Core :c
$InputObject.Cookies.GetCookies($local:Graylog_BaseURI) | ForEach-Object { $InputObject.Cookies.GetCookies($local:Graylog_BaseURI) | ForEach-Object {