Project

PSPublishModule

Build, test, version, sign, and publish PowerShell modules with reusable PowerForge pipelines.

Stars 48
Forks 16
PowerShell Gallery downloads 17,213
Release v3.0.169
Language: C# Updated: 2026-10-13

API Reference

Command

Install-ManagedScript

Namespace PSPublishModule
Inputs
System.String[]
Outputs
PowerForge.ManagedScriptInstallResult PowerForge.ManagedScriptInstallPlan

Installs script resources through the managed C# resource engine.

Remarks

Installs script resources through the managed C# resource engine.

Examples

Authored help example

Install the latest stable script from the default public gallery endpoint.


Install-ManagedScript -Name Invoke-CompanyTask -Scope CurrentUser
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Install-ManagedScript [-AcceptLicense] [-AllowedAuthor <String[]>] [-Credential <PSCredential>] [-CredentialSecret <String>] [-CredentialSecretFilePath <String>] [-CredentialUserName <String>] [-ExpectedPackageSha256 <String>] [-Force] [-MaximumVersion <String>] [-MinimumVersion <String>] -Name <String[]> [-NoPathUpdate] [-PackageCacheDirectory <String>] [-Plan] [-Prerelease] [-ProfileName <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Repository <String>] [-RepositoryName <String>] [-RequireTrustedRepository] [-Scope <CurrentUser|AllUsers|Custom>] [-ScriptRoot <String>] [-ShellEdition <Auto|Desktop|Core>] [-TrustPolicy <ManagedModuleTrustPolicy>] [-Version <String>] [-VersionPolicy <String>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AcceptLicense SwitchParameter optionalposition: namedpipeline: False
Accept package licenses when packages declare license acceptance is required.
AllowedAuthor String[] optionalposition: namedpipeline: Falsealiases: RequiredAuthor, TrustedAuthor
Allowed package author values from package metadata.
Credential PSCredential optionalposition: namedpipeline: False
Optional repository credential.
CredentialSecret String optionalposition: namedpipeline: Falsealiases: Password, Token
Optional repository credential secret.
CredentialSecretFilePath String optionalposition: namedpipeline: Falsealiases: CredentialPath, TokenPath
Optional path to a file containing the repository credential secret.
CredentialUserName String optionalposition: namedpipeline: Falsealiases: UserName
Optional repository credential username.
ExpectedPackageSha256 String optionalposition: namedpipeline: Falsealiases: PackageSha256, Sha256
Expected SHA256 hash of the script package before it is extracted and installed.
Force SwitchParameter optionalposition: namedpipeline: False
Reinstall the script version when it already exists.
MaximumVersion String optionalposition: namedpipeline: False
Maximum package version to install when Version is omitted.
MinimumVersion String optionalposition: namedpipeline: False
Minimum package version to install when Version is omitted.
Name String[] requiredposition: 0pipeline: True (ByPropertyName)aliases: ScriptName
Script resource names to install.
NoPathUpdate SwitchParameter optionalposition: namedpipeline: False
Do not add the resolved script root to the current process PATH after installation.
PackageCacheDirectory String optionalposition: namedpipeline: False
Optional package cache directory.
Plan SwitchParameter optionalposition: namedpipeline: False
Return an inspectable install plan without writing files.
Prerelease SwitchParameter optionalposition: namedpipeline: Falsealiases: AllowPrerelease
Include prerelease versions when resolving the latest version.
ProfileName String optionalposition: namedpipeline: False
Saved repository profile name.
Proxy Uri optionalposition: namedpipeline: False
Optional HTTP proxy used for repository requests.
ProxyCredential PSCredential optionalposition: namedpipeline: False
Optional proxy credential used with Proxy.
Repository String optionalposition: 1pipeline: Falsealiases: RepositoryUri, Source
Repository URL, NuGet v3 service index, flat-container URL, or local folder feed.
RepositoryName String optionalposition: namedpipeline: False
Friendly repository name used in output.
RequireTrustedRepository SwitchParameter optionalposition: namedpipeline: False
Require the selected repository profile to be marked trusted.
Scope ManagedScriptInstallScope optionalposition: namedpipeline: Falsevalues: 3
Install scope used when ScriptRoot is not supplied.
Possible values: CurrentUser, AllUsers, Custom
ScriptRoot String optionalposition: namedpipeline: Falsealiases: Path
Explicit script root. When supplied, Scope is treated as Custom.
ShellEdition ManagedModuleShellEdition optionalposition: namedpipeline: Falsevalues: 3
PowerShell path family used when resolving default CurrentUser or AllUsers script roots.
Possible values: Auto, Desktop, Core
TrustPolicy ManagedModuleTrustPolicy optionalposition: namedpipeline: False
Optional typed repository/package trust policy.
Version String optionalposition: namedpipeline: Falsealiases: RequiredVersion
Exact package version to install. When omitted, the latest repository version is used.
VersionPolicy String optionalposition: namedpipeline: False
NuGet-style version range policy used when Version is omitted.

Outputs

PowerForge.ManagedScriptInstallResult, PowerForge.ManagedScriptInstallPlan