Skip to content

Add-PSDll

Loads the CapaOne.ScriptingLibrary .NET assembly from $DllPath and creates the $cs object that every $cs.* helper call in a PowerPack script goes through.

Add-PSDll

None. Uses the script-scoped $DllPath variable (and $global:RunType, if set, to validate standalone-mode configuration).

[CapaOne.ScriptingLibrary] — the $cs object used throughout the rest of the script.

Terminal window
# From the MAIN section of the script template — shown for reference only:
Import-Module (Join-Path $global:Packageroot $pgkit 'PSlib.psm1') -ErrorAction stop
$cs = Add-PSDll

Initialize-Variables