PowerPack Global Variables
Set from the script parameters
Section titled “Set from the script parameters”These are set directly from the parameters CapaInstaller passes into every PowerPack script (see the # DO NOT CHANGE THESE VARIABLES block of the script templates) — available from the very start of the script, before Initialize-Variables runs.
| Variable | Data type | Example |
|---|---|---|
| $global:Packageroot | string | C:\Program Files\CapaInstaller\Client\Packages... |
| $global:AppName | string | WS Ready To Use |
| $global:AppRelease | string | 1.0 |
| $global:LogFile | string | C:...\Logs\WS Ready To Use\Install.log |
| $global:TempFolder | string | C:...\Temp |
| $global:DllPath | string | C:...\CapaOne.ScriptingLibrary.dll |
| $global:InputObject | Object | The Named Pipe connection back to CiBaseAgent (see below) |
$global:PSLibVersion (string, for example 2026.04.24) holds the version of PSlib.psm1. It’s set when the template imports PSlib.psm1, at the start of #### MAIN ####.
Configurable per package
Section titled “Configurable per package”Set in the #### VARIABLES #### block at the top of the script — see the script templates for the exact defaults used in the install vs. uninstall template.
| Variable | Data type | Purpose | Default (install / uninstall template) |
|---|---|---|---|
| $global:DownloadPackage | bool | Download the kit folder from the server before Install (or Uninstall) runs |
$true / $false |
| $global:MinimumDiskspaceMB | int | Minimum free disk space on the system drive, in MB, checked in PreInstall (or PreUninstall) |
1500 / 0 |
Set by Initialize-Variables
Section titled “Set by Initialize-Variables”| Variable | Data type | Example |
|---|---|---|
| $global:gsProgramFiles | string | C:\Program Files |
| $global:gsProgramFilesx86 | string | C:\Program Files (x86) |
| $global:gsWindowsDir | string | C:\Windows |
| $global:gsWorkstationPath | string | C:\Program Files\CapaInstaller\Client\ |
| $global:gsSystemRoot | string | C:\Windows |
| $global:gsSystemDir | string | C:\Windows\System32 |
| $global:gsSystemDirx86 | string | C:\Windows\Syswow64 |
| $global:gsLogDir | string | C:\Program Files\CapaInstaller\Client\Logs |
| $global:gsTempDir | string | C:\Program Files\CapaInstaller\Client\Logs\Temp |
| $global:gsOsSystem | string | Microsoft Windows 11 Pro N |
| $global:gsOsVersion | string | 10.0.22631.0 |
| $global:gsLog | string | C:\Program Files\CapaInstaller\Client\Logs\WS Ready To Use\Install.log |
| $global:AppLogFolder | string | C:\Program Files\CapaInstaller\Client\Logs\WS Ready To Use |
| $global:gsLogName | string | Install.log |
| $global:gsTask | string | INSTALL |
| $global:gbDisablelog | bool | False |
| $global:gbSuficientDiskSpace | bool | True |
| $global:gsJobName | string | WS Ready To Use |
| $global:gsLibrary | string | C:\Program Files\CapaInstaller\Client\Lib |
| $global:gbx64 | bool | True |
| $global:gsCommonPrograms | string | C:\ProgramData\Microsoft\Windows\Start Menu\Programs |
| $global:gsSysDrive | string | C: |
| $global:gsCommonDesktop | string | C:\Users\Public\Desktop |
| $global:gsCommonStartMenu | string | C:\ProgramData\Microsoft\Windows\Start Menu |
| $global:gsCommonStartup | string | C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup |
| $global:gsCommonFilesDir | string | C:\Program Files\Common Files |
| $global:gsCommonFilesDirx86 | string | C:\Program Files (x86)\Common Files |
| $global:gsCommonAppData | string | C:\ProgramData |
| $global:gsProgramData | string | C:\ProgramData |
| $global:gsProductid | string | WS Ready To Use |
| $global:gsAllusers | string | C:\ProgramData |
| $global:gsWorkstationName | string | TEST01 |
| $global:gsOsBuild | string | 22631 |
| $global:gsEditionId | string | ProfessionalN |
| $global:gsDisplayVersion | string | 23H2 |
| $global:gsWindowsType | string | WinNT |
| $global:gsOsArchitechture | string | X64 |
| $global:gsWindowsVersion | string | 6.3 |
| $global:gsUnitName | string | 593F4D56-97B0-0CE5-A288-46DD2907041E |
| $global:gsComputerManufacturer | string | VMware, Inc. |
| $global:gsComputerModel | string | VMware20,1 |
| $global:gsUUID | string | 593F4D56-97B0-0CE5-A288-46DD2907041E |