From e99c655f6c644c11d290b85da6f42edb4635a53d Mon Sep 17 00:00:00 2001 From: Yvan Duhamel Date: Mon, 3 Apr 2023 09:54:39 +0200 Subject: [PATCH] set $baseScript to an empty string --- .../Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 b/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 index 459010399..d328e7374 100644 --- a/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 +++ b/SharePointDsc/Modules/SharePointDsc.Util/SharePointDsc.Util.psm1 @@ -666,6 +666,10 @@ function Invoke-SPDscCommand "@ } + else + { + $baseScript = "" + } $invokeArgs = @{ ScriptBlock = [ScriptBlock]::Create($baseScript + $ScriptBlock.ToString())