Files
PSOPNSenseAPI/output/PSOPNSenseAPI-01/PSOPNSenseAPI.psm1
T
GraceSolutions 7535135bfd Fix threading issue in cmdlets
- Fixed threading issue in cmdlets that was causing 'WriteObject and WriteError methods cannot be called from outside the overrides' error
- Changed module structure to use DLL as root module instead of nested module
- Updated configuration cmdlets to properly handle async operations
2025-04-15 09:24:51 -04:00

14 lines
399 B
PowerShell

# Load the main assembly directly
$mainDllPath = Join-Path $PSScriptRoot "lib\PSOPNSenseAPI.dll"
Write-Verbose "Loading assembly from $mainDllPath"
try {
Add-Type -Path $mainDllPath
Write-Verbose "Successfully loaded assembly from $mainDllPath"
} catch {
$errorMessage = $_.Exception.Message
Write-Error "Failed to load assembly from $($mainDllPath): $($errorMessage)"
throw
}