Assembly
An Assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. In a ScriptoForm, assemblies are provided by Microsoft with the .NET framework within PowerShell and are used to implement Windows forms and child controls or components. They can be referenced by using the
Add-Type cmdlet, which lets you define a Microsoft .NET class in your PowerShell session available in the referenced assembly. You can then instantiate objects, by using the New-Object cmdlet, and use the objects just as you would use any .NET object.Examples
Section titled “Examples”Add-Type -AssemblyName System.Windows.Forms
# Other lesser used assemblies:Add-Type -AssemblyName System.Windows.Forms.DataVisualizationAdd-Type -AssemblyName System.DrawingAdd-Type -AssemblyName System.DataAdd-Type -AssemblyName System.XmlAn Assembly must be loaded prior to instantiating any form or control defined in it.