Updated Connect-GraylogService to import the ConvertFrom-GraylogSession function before it calls is
This commit is contained in:
parent
3511d98e62
commit
63bfd2bc40
@ -30,7 +30,6 @@ function Connect-GraylogService {
|
|||||||
[PSCredential]
|
[PSCredential]
|
||||||
$Credential
|
$Credential
|
||||||
)
|
)
|
||||||
if ((Test-GraylogSession -SkipSecretCheck)) { return } # If the session is still valid, don't create a new one
|
|
||||||
if (-NOT $Credential) {
|
if (-NOT $Credential) {
|
||||||
try {
|
try {
|
||||||
$Credential = Get-Secret Graylog_Credential -Vault Graylog -ErrorAction Stop
|
$Credential = Get-Secret Graylog_Credential -Vault Graylog -ErrorAction Stop
|
||||||
@ -61,6 +60,7 @@ function Connect-GraylogService {
|
|||||||
try { $null = Invoke-RestMethod @Request }
|
try { $null = Invoke-RestMethod @Request }
|
||||||
catch { throw $_.Exception.Message }
|
catch { throw $_.Exception.Message }
|
||||||
|
|
||||||
|
Import-Module "$PSScriptRoot\..\Private\ConvertFrom-GraylogSession.ps1"
|
||||||
$GraylogSession | ConvertFrom-GraylogSession | Set-Secret Graylog_Session
|
$GraylogSession | ConvertFrom-GraylogSession | Set-Secret Graylog_Session
|
||||||
}
|
}
|
||||||
# Export-ModuleMember -Function Connect-Graylog
|
# Export-ModuleMember -Function Connect-Graylog
|
Loading…
Reference in New Issue
Block a user