Skip to content

ESICollector: Missing -Path parameter in Set-ESIContent calls at CollectExchSecIns.ps1 #13884

@msacharewicz

Description

@msacharewicz

The current version of the ESICollector contains a bug in the CollectExchSecIns.ps1 file, preventing it to run correctly.

The Set-ESIContent function is called without explicitly specifying the -Path parameter, which leads to incorrect argument binding and causes a subsequent runtime error.

Please add -Path parameter to both affected lines:

@@ -923,9 +923,9 @@
             else 
             { 
                 if ($Global:InstanceName -ne "Default") {
-                    $JSNToSave | Set-ESIContent ((Split-Path $outputpath) + "\DateTracking-$($Global:InstanceName).esi")
-                }
-                else { $JSNToSave | Set-ESIContent ((Split-Path $outputpath) + "\DateTracking.esi") }
+                    $JSNToSave | Set-ESIContent -Path ((Split-Path $outputpath) + "\DateTracking-$($Global:InstanceName).esi")
+                }
+                else { $JSNToSave | Set-ESIContent -Path ((Split-Path $outputpath) + "\DateTracking.esi") }
             }

Metadata

Metadata

Labels

SolutionSolution specialty review needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions