From 3511d98e62406317b0fe918f0320b8ff23dc32a6 Mon Sep 17 00:00:00 2001 From: Nathan Windisch Date: Fri, 26 Jul 2024 13:57:04 +0100 Subject: [PATCH] Added some functionality for PS5.1 and below, as it doesn't seem to properly import the other functions --- PSGraylog.psm1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PSGraylog.psm1 b/PSGraylog.psm1 index a98c155..f59e644 100644 --- a/PSGraylog.psm1 +++ b/PSGraylog.psm1 @@ -1,2 +1,6 @@ Import-Module "$PSScriptRoot/Functions/Public/Initialize-GraylogServiceVault.ps1" -$null = Initialize-GraylogServiceVault \ No newline at end of file +$null = Initialize-GraylogServiceVault + +if ($PSVersionTable.PSVersion.Major -lt 7) { + Get-ChildItem "$PSScriptRoot/Functions" -Filter "*.ps1" -Recurse | ForEach-Object { Import-Module $_.FullName } +} \ No newline at end of file