mirror of
https://github.com/freedbygrace/PSOPNSenseAPI.git
synced 2026-08-06 08:58:17 +00:00
7535135bfd
- 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
14 lines
399 B
PowerShell
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
|
|
}
|