From 63bfd2bc40e9b8b805f641cd975d25ce65dcfa8d Mon Sep 17 00:00:00 2001 From: Nathan Windisch Date: Fri, 26 Jul 2024 13:57:45 +0100 Subject: [PATCH] Updated Connect-GraylogService to import the ConvertFrom-GraylogSession function before it calls is --- Functions/Public/Connect-GraylogService.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Functions/Public/Connect-GraylogService.ps1 b/Functions/Public/Connect-GraylogService.ps1 index c122c90..1be6bb4 100644 --- a/Functions/Public/Connect-GraylogService.ps1 +++ b/Functions/Public/Connect-GraylogService.ps1 @@ -30,7 +30,6 @@ function Connect-GraylogService { [PSCredential] $Credential ) - if ((Test-GraylogSession -SkipSecretCheck)) { return } # If the session is still valid, don't create a new one if (-NOT $Credential) { try { $Credential = Get-Secret Graylog_Credential -Vault Graylog -ErrorAction Stop @@ -61,6 +60,7 @@ function Connect-GraylogService { try { $null = Invoke-RestMethod @Request } catch { throw $_.Exception.Message } + Import-Module "$PSScriptRoot\..\Private\ConvertFrom-GraylogSession.ps1" $GraylogSession | ConvertFrom-GraylogSession | Set-Secret Graylog_Session } # Export-ModuleMember -Function Connect-Graylog \ No newline at end of file