Installation¶
PSScriptBuilder is available on PowerShell Gallery and supports PowerShell 5.1 and later on Windows, Linux, and macOS. It has no external dependencies beyond the PowerShell runtime.
Requirements¶
| Requirement | Version |
|---|---|
| PowerShell | 5.1 or later (Windows PowerShell and PowerShell 7+) |
| Operating System | Windows, Linux, macOS |
Walkthrough¶
1. Install the Module¶
Installation fails with a publisher verification error?
PSScriptBuilder is not Authenticode-signed. On some systems this causes Install-Module
to fail with a publisher check error. Add -SkipPublisherCheck to bypass it:
To install for all users on the machine (requires elevated permissions):
2. Verify the Installation¶
3. Import the Module¶
Always use using module, not Import-Module
PSScriptBuilder exposes PowerShell classes and enums. PowerShell only makes class and enum
definitions available when a module is loaded with using module. With Import-Module, cmdlets
work but classes and enums are not accessible.
The using module statement must appear at the very top of your script, before any other code.
4. Scaffold Your First Project¶
The module is ready. Head to Quick Start to scaffold a new project and run your first build in under a minute.
Tips¶
Building from source
See Also¶
- Cmdlet Reference — all public cmdlets