I am working on a PowerShell script for use in a rule.
The script needs to load the ActiveDirectory module to function. The ActiveDirectory Module requires System.ServiceModel.NetTcp under PWSH to run, however that is not currently available to the PowerShell libraries that are used by the Syslog NG service.
The script runs when I run it on my development system, but I have PowerShell 7.4.6 which contains the full .NET 8.0.10 framework.
Is there a way to install / reference the missing .NET components/packages so that the script can function? I have found them on NuGet, but I doubt it is as simple as copying the DLLs into the service directory.
EDIT:
For reference, the error being thrown is:
TerminatingError(Get-ADObject): "Could not load file or assembly 'System.ServiceModel.NetTcp, Version=4.10.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified."
Thanks,
Eric