# Install-ManagedScript

Installs script resources through the managed C# resource engine.

Project

PSPublishModule

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

[View on GitHub](https://github.com/EvotecIT/PSPublishModule) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSPublishModule/releases/tag/v3.0.124) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSPublishModule/2.0.27)

Stars **48**

Forks **15**

Open issues **1**

PowerShell Gallery downloads **17,213**

Release **v3.0.195**

Language: C# Updated: 2026-11-25

Command 

**Module**

`PSPublishModule`

**Inputs**

`System.String[]`

**Outputs**

`PowerForge.ManagedScriptInstallResult` `PowerForge.ManagedScriptInstallPlan`

Installs script resources through the managed C# resource engine.

## 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>]
```

[#](#member-af44442395a707f880ee49d6)

Parameter set: `All Parameter Sets`

## Examples

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

```powershell
Install-ManagedScript -Name Invoke-CompanyTask -Scope CurrentUser
```

## Parameters

**-AcceptLicense SwitchParameter optional**

Accept package licenses when packages declare license acceptance is required.

**-AllowedAuthor String[] optionalaliases: RequiredAuthor, TrustedAuthor**

Allowed package author values from package metadata.

**-Credential PSCredential optional**

Optional repository credential.

**-CredentialSecret String optionalaliases: Password, Token**

Optional repository credential secret.

**-CredentialSecretFilePath String optionalaliases: CredentialPath, TokenPath**

Optional path to a file containing the repository credential secret.

**-CredentialUserName String optionalaliases: UserName**

Optional repository credential username.

**-ExpectedPackageSha256 String optionalaliases: PackageSha256, Sha256**

Expected SHA256 hash of the script package before it is extracted and installed.

**-Force SwitchParameter optional**

Reinstall the script version when it already exists.

**-MaximumVersion String optional**

Maximum package version to install when Version is omitted.

**-MinimumVersion String optional**

Minimum package version to install when Version is omitted.

**-Name String[] requiredposition: 0pipeline: True (ByPropertyName)aliases: ScriptName**

Script resource names to install.

**-NoPathUpdate SwitchParameter optional**

Do not add the resolved script root to the current process PATH after installation.

**-PackageCacheDirectory String optional**

Optional package cache directory.

**-Plan SwitchParameter optional**

Return an inspectable install plan without writing files.

**-Prerelease SwitchParameter optionalaliases: AllowPrerelease**

Include prerelease versions when resolving the latest version.

**-ProfileName String optional**

Saved repository profile name.

**-Proxy Uri optional**

Optional HTTP proxy used for repository requests.

**-ProxyCredential PSCredential optional**

Optional proxy credential used with Proxy.

**-Repository String optionalposition: 1aliases: RepositoryUri, Source**

Repository URL, NuGet v3 service index, flat-container URL, or local folder feed.

**-RepositoryName String optional**

Friendly repository name used in output.

**-RequireTrustedRepository SwitchParameter optional**

Require the selected repository profile to be marked trusted.

**-Scope ManagedScriptInstallScope optional**

Install scope used when ScriptRoot is not supplied.

Possible values: `CurrentUser`, `AllUsers`, `Custom`

**-ScriptRoot String optionalaliases: Path**

Explicit script root. When supplied, Scope is treated as Custom.

**-ShellEdition ManagedModuleShellEdition optional**

PowerShell path family used when resolving default CurrentUser or AllUsers script roots.

Possible values: `Auto`, `Desktop`, `Core`

**-TrustPolicy ManagedModuleTrustPolicy optional**

Optional typed repository/package trust policy.

**-Version String optionalaliases: RequiredVersion**

Exact package version to install. When omitted, the latest repository version is used.

**-VersionPolicy String optional**

NuGet-style version range policy used when Version is omitted.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:28735E942376DA46D82C8CF001313A59E6C7CB93F09FC14F69758AEF336CD23A -->
