February 2019
Intermediate to advanced
626 pages
15h 51m
English
If an assembly is listed in the using statement for a script, it will be loaded. For example, System.Windows.Forms may be loaded in Windows PowerShell; the assembly is not available in PowerShell Core:
using assembly System.Windows.Forms
Add-Type is able to do much the same thing:
Add-Type -AssemblyName System.Windows.Forms
Assemblies loaded by name are stored in the Global Assembly Cache (GAC). The GAC is stored in $env:WINDIR\Assembly. gacutil may be used to find assemblies within the cache:
gacutil /l System.Windows.Forms
The Gac module, on the PowerShell Gallery, provides a more consistent experience:
PS> Install-Module Gac -Scope CurrentUserPS> Get-GacAssembly System.Windows.FormsName Version Culture PublicKeyToken PrArch ...
Read now
Unlock full access