< Back
Install-Package
Post
NAME Install-Package
SYNOPSIS
Installs one or more software packages.
SYNTAX
Install-Package [-AdditionalArguments <String[]>] [-AllVersions] [-Confirm] [-Credential <PSCredential>] [-Force]
[-ForceBootstrap] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-WhatIf] [<CommonParameters>]
Install-Package [-AdditionalArguments <String[]>] [-AllVersions] [-Confirm] [-Credential <PSCredential>] [-Force]
[-ForceBootstrap] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-WhatIf] [<CommonParameters>]
Install-Package [-AllVersions] [-AllowClobber] [-Command <String[]>] [-Confirm] [-Credential <PSCredential>]
[-DscResource <String[]>] [-Filter <String>] [-Force] [-ForceBootstrap] [-Includes {DscResource | Cmdlet |
Function | Workflow | RoleCapability}] [-InstallUpdate] [-NoPathUpdate] [-PackageManagementProvider <String>]
[-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-PublishLocation <String>] [-RoleCapability <String[]>] [-Scope
{CurrentUser | AllUsers}] [-ScriptPublishLocation <String>] [-ScriptSourceLocation <String>] [-SkipPublisherCheck]
[-Tag <String[]>] [-Type {Module | Script | All}] [-WhatIf] [<CommonParameters>]
Install-Package [-AllVersions] [-AllowClobber] [-Command <String[]>] [-Confirm] [-Credential <PSCredential>]
[-DscResource <String[]>] [-Filter <String>] [-Force] [-ForceBootstrap] [-Includes {DscResource | Cmdlet |
Function | Workflow | RoleCapability}] [-InstallUpdate] [-NoPathUpdate] [-PackageManagementProvider <String>]
[-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-PublishLocation <String>] [-RoleCapability <String[]>] [-Scope
{CurrentUser | AllUsers}] [-ScriptPublishLocation <String>] [-ScriptSourceLocation <String>] [-SkipPublisherCheck]
[-Tag <String[]>] [-Type {Module | Script | All}] [-WhatIf] [<CommonParameters>]
Install-Package [-AllVersions] [-AllowPrereleaseVersions] [-ConfigFile <String>] [-Confirm] [-Contains <String>]
[-Credential <PSCredential>] [-Destination <String>] [-ExcludeVersion] [-FilterOnTag <String[]>] [-Force]
[-ForceBootstrap] [-Headers <String[]>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Scope {CurrentUser |
AllUsers}] [-SkipDependencies] [-SkipValidate] [-WhatIf] [<CommonParameters>]
Install-Package [-AllVersions] [-AllowPrereleaseVersions] [-ConfigFile <String>] [-Confirm] [-Contains <String>]
[-Credential <PSCredential>] [-Destination <String>] [-ExcludeVersion] [-FilterOnTag <String[]>] [-Force]
[-ForceBootstrap] [-Headers <String[]>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Scope {CurrentUser |
AllUsers}] [-SkipDependencies] [-SkipValidate] [-WhatIf] [<CommonParameters>]
Install-Package [-AllVersions] [-Confirm] [-Credential <PSCredential>] [-Force] [-ForceBootstrap]
[-IncludeSystemComponent] [-IncludeWindowsInstaller] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-WhatIf]
[<CommonParameters>]
Install-Package [-AllVersions] [-Confirm] [-Credential <PSCredential>] [-Force] [-ForceBootstrap]
[-IncludeSystemComponent] [-IncludeWindowsInstaller] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-WhatIf]
[<CommonParameters>]
Install-Package [-InputObject] <SoftwareIdentity[]> [-AllVersions] [-Confirm] [-Credential <PSCredential>]
[-Force] [-ForceBootstrap] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-WhatIf] [<CommonParameters>]
Install-Package [-Name] <String[]> [-AllVersions] [-Confirm] [-Credential <PSCredential>] [-Force]
[-ForceBootstrap] [-MaximumVersion <String>] [-MinimumVersion <String>] [-ProviderName {msi | NuGet | msu |
Programs | PowerShellGet | psl | chocolatey}] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-RequiredVersion
<String>] [-Source <String[]>] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Install-Package cmdlet installs one or more software packages on the local computer.
PARAMETERS
-AdditionalArguments <String[]>
Specifies one or more additional arguments for installation.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-AllVersions [<SwitchParameter>]
Indicates that this cmdlet installs all available versions of the package. By default, Install -Package only
installs the newest available version.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-AllowClobber [<SwitchParameter>]
@{Text=}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-AllowPrereleaseVersions [<SwitchParameter>]
{{Fill AllowPrereleaseVersions Description}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Command <String[]>
Specifies one or more commands for which Find-Package searches.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ConfigFile <String>
{{Fill ConfigFile Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Contains <String>
{{Fill Contains Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Credential <PSCredential>
Specifies a user account that has rights to install a package for a specified package provider or source.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Destination <String>
{{Fill Destination Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DscResource <String[]>
Specifies one or more Desired State Configuration (DSC) resources for which Find-Package searches.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ExcludeVersion [<SwitchParameter>]
{{Fill ExcludeVersion Description}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Filter <String>
Specifies terms to search for within the Name and Description properties.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-FilterOnTag <String[]>
{{Fill FilterOnTag Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Force [<SwitchParameter>]
Indicates that this cmdlet overrides restrictions that prevent the command from succeeding, as long as the
changes do not compromise security.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ForceBootstrap [<SwitchParameter>]
Forces PackageManagement to automatically install the package provider for the specified package.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Headers <String[]>
{{Fill Headers Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-IncludeSystemComponent [<SwitchParameter>]
Indicates that this cmdlet includes system components in the results.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-IncludeWindowsInstaller [<SwitchParameter>]
Indicates that this cmdlet includes the Windows installer in the results.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Includes <String[]>
Specifies whether Find-Package should find all packages with DSC resources, cmdlets, functions, or workflows.
The acceptable values for this parameter are:
- Cmdlet
- DscResource
- Function
- Workflow
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InputObject <SoftwareIdentity[]>
Specifies a package by using the package's SoftwareIdentity type, which is shown in the results of the
Find-Package cmdlet.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-InstallUpdate [<SwitchParameter>]
Indicates that this cmdlet installs updates.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-MaximumVersion <String>
Specifies the maximum allowed version of the package that you want to find. If you do not specify this
parameter, Install-Package installs the finds the highest-numbered available version of the package.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-MinimumVersion <String>
Specifies the minimum allowed version of the package that you want to find. If you do not add this parameter,
Install-Package finds the highest available version of the package that also satisfies any maximum specified
version specified by the MaximumVersion parameter.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String[]>
Specifies one or more package names. Multiple names must be separated by commas.
Required? true
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-NoPathUpdate [<SwitchParameter>]
@{Text=}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-PackageManagementProvider <String>
Specifies the name of the Package Management provider.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ProviderName <String[]>
Specifies one or more package provider names to which to scope your package search. You can get package
provider names by running the Get-PackageProvider cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Proxy <Uri>
@{Text=}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ProxyCredential <PSCredential>
@{Text=}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PublishLocation <String>
Specifies a location for publishing the package.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-RequiredVersion <String>
Specifies the exact allowed version of the package that you want to install. If you do not add this parameter,
Install-Package installs the newest available version of the package that also satisfies any maximum version
specified by the MaximumVersion parameter.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-RoleCapability <String[]>
@{Text=}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Scope <String>
Specifies the scope to which to install the package. The acceptable values for this parameter are:
- CurrentUser
- AllUsers
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ScriptPublishLocation <String>
Specifies the script publish location.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ScriptSourceLocation <String>
Specifies the script source location.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SkipDependencies [<SwitchParameter>]
{{Fill SkipDependencies Description}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-SkipPublisherCheck [<SwitchParameter>]
@{Text=}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-SkipValidate [<SwitchParameter>]
{{Fill SkipValidate Description}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Source <String[]>
Specifies one or more package sources. Multiple package source names must be separated by commas. You can get
package source names by running the Get-PackageSource cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Tag <String[]>
Specifies one or more strings to search for in the package metadata.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Type <String>
Specifies whether to search for packages with a module, a script, or both. The acceptable values for this
parameter are:
- Module
- Script
- All
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
SoftwareIdentity[]
NOTES
Example 1: Install a package by package name
PS C:\\>Install-Package -Name "DSCAccelerator" -Credential "CONTOSO\\TestUser"
This command installs a package named DSCAccelerator. When you run this command, you are prompted to provide a
password for the account that has rights to install the package.
Example 2: Install a package that you find with Find-Package
PS C:\\>Find-Package "zoomit" | Install-Package
This command installs a package named zoomit by piping the package from a Find-Package command.
Example 3: Install packages by specifying a range of versions
PS C:\\>Install-Package -Name "DSCAccel" -MinimumVersion 2.1.2 -MaximumVersion 2.2
This command installs any package that has a name matching the partial name DSCAccel. The command installs the
newest version of the package, within a range of versions that is specified by adding the MinimumVersion and
MaximumVersion parameters.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=517138
about_PackageManagement
Get-Package
Find-Package
Save-Package
Uninstall-Package
SYNOPSIS
Installs one or more software packages.
SYNTAX
Install-Package [-AdditionalArguments <String[]>] [-AllVersions] [-Confirm] [-Credential <PSCredential>] [-Force]
[-ForceBootstrap] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-WhatIf] [<CommonParameters>]
Install-Package [-AdditionalArguments <String[]>] [-AllVersions] [-Confirm] [-Credential <PSCredential>] [-Force]
[-ForceBootstrap] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-WhatIf] [<CommonParameters>]
Install-Package [-AllVersions] [-AllowClobber] [-Command <String[]>] [-Confirm] [-Credential <PSCredential>]
[-DscResource <String[]>] [-Filter <String>] [-Force] [-ForceBootstrap] [-Includes {DscResource | Cmdlet |
Function | Workflow | RoleCapability}] [-InstallUpdate] [-NoPathUpdate] [-PackageManagementProvider <String>]
[-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-PublishLocation <String>] [-RoleCapability <String[]>] [-Scope
{CurrentUser | AllUsers}] [-ScriptPublishLocation <String>] [-ScriptSourceLocation <String>] [-SkipPublisherCheck]
[-Tag <String[]>] [-Type {Module | Script | All}] [-WhatIf] [<CommonParameters>]
Install-Package [-AllVersions] [-AllowClobber] [-Command <String[]>] [-Confirm] [-Credential <PSCredential>]
[-DscResource <String[]>] [-Filter <String>] [-Force] [-ForceBootstrap] [-Includes {DscResource | Cmdlet |
Function | Workflow | RoleCapability}] [-InstallUpdate] [-NoPathUpdate] [-PackageManagementProvider <String>]
[-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-PublishLocation <String>] [-RoleCapability <String[]>] [-Scope
{CurrentUser | AllUsers}] [-ScriptPublishLocation <String>] [-ScriptSourceLocation <String>] [-SkipPublisherCheck]
[-Tag <String[]>] [-Type {Module | Script | All}] [-WhatIf] [<CommonParameters>]
Install-Package [-AllVersions] [-AllowPrereleaseVersions] [-ConfigFile <String>] [-Confirm] [-Contains <String>]
[-Credential <PSCredential>] [-Destination <String>] [-ExcludeVersion] [-FilterOnTag <String[]>] [-Force]
[-ForceBootstrap] [-Headers <String[]>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Scope {CurrentUser |
AllUsers}] [-SkipDependencies] [-SkipValidate] [-WhatIf] [<CommonParameters>]
Install-Package [-AllVersions] [-AllowPrereleaseVersions] [-ConfigFile <String>] [-Confirm] [-Contains <String>]
[-Credential <PSCredential>] [-Destination <String>] [-ExcludeVersion] [-FilterOnTag <String[]>] [-Force]
[-ForceBootstrap] [-Headers <String[]>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Scope {CurrentUser |
AllUsers}] [-SkipDependencies] [-SkipValidate] [-WhatIf] [<CommonParameters>]
Install-Package [-AllVersions] [-Confirm] [-Credential <PSCredential>] [-Force] [-ForceBootstrap]
[-IncludeSystemComponent] [-IncludeWindowsInstaller] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-WhatIf]
[<CommonParameters>]
Install-Package [-AllVersions] [-Confirm] [-Credential <PSCredential>] [-Force] [-ForceBootstrap]
[-IncludeSystemComponent] [-IncludeWindowsInstaller] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-WhatIf]
[<CommonParameters>]
Install-Package [-InputObject] <SoftwareIdentity[]> [-AllVersions] [-Confirm] [-Credential <PSCredential>]
[-Force] [-ForceBootstrap] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-WhatIf] [<CommonParameters>]
Install-Package [-Name] <String[]> [-AllVersions] [-Confirm] [-Credential <PSCredential>] [-Force]
[-ForceBootstrap] [-MaximumVersion <String>] [-MinimumVersion <String>] [-ProviderName {msi | NuGet | msu |
Programs | PowerShellGet | psl | chocolatey}] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-RequiredVersion
<String>] [-Source <String[]>] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Install-Package cmdlet installs one or more software packages on the local computer.
PARAMETERS
-AdditionalArguments <String[]>
Specifies one or more additional arguments for installation.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-AllVersions [<SwitchParameter>]
Indicates that this cmdlet installs all available versions of the package. By default, Install -Package only
installs the newest available version.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-AllowClobber [<SwitchParameter>]
@{Text=}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-AllowPrereleaseVersions [<SwitchParameter>]
{{Fill AllowPrereleaseVersions Description}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Command <String[]>
Specifies one or more commands for which Find-Package searches.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ConfigFile <String>
{{Fill ConfigFile Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Contains <String>
{{Fill Contains Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Credential <PSCredential>
Specifies a user account that has rights to install a package for a specified package provider or source.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Destination <String>
{{Fill Destination Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DscResource <String[]>
Specifies one or more Desired State Configuration (DSC) resources for which Find-Package searches.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ExcludeVersion [<SwitchParameter>]
{{Fill ExcludeVersion Description}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Filter <String>
Specifies terms to search for within the Name and Description properties.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-FilterOnTag <String[]>
{{Fill FilterOnTag Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Force [<SwitchParameter>]
Indicates that this cmdlet overrides restrictions that prevent the command from succeeding, as long as the
changes do not compromise security.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ForceBootstrap [<SwitchParameter>]
Forces PackageManagement to automatically install the package provider for the specified package.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Headers <String[]>
{{Fill Headers Description}}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-IncludeSystemComponent [<SwitchParameter>]
Indicates that this cmdlet includes system components in the results.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-IncludeWindowsInstaller [<SwitchParameter>]
Indicates that this cmdlet includes the Windows installer in the results.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Includes <String[]>
Specifies whether Find-Package should find all packages with DSC resources, cmdlets, functions, or workflows.
The acceptable values for this parameter are:
- Cmdlet
- DscResource
- Function
- Workflow
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InputObject <SoftwareIdentity[]>
Specifies a package by using the package's SoftwareIdentity type, which is shown in the results of the
Find-Package cmdlet.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-InstallUpdate [<SwitchParameter>]
Indicates that this cmdlet installs updates.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-MaximumVersion <String>
Specifies the maximum allowed version of the package that you want to find. If you do not specify this
parameter, Install-Package installs the finds the highest-numbered available version of the package.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-MinimumVersion <String>
Specifies the minimum allowed version of the package that you want to find. If you do not add this parameter,
Install-Package finds the highest available version of the package that also satisfies any maximum specified
version specified by the MaximumVersion parameter.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String[]>
Specifies one or more package names. Multiple names must be separated by commas.
Required? true
Position? 0
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-NoPathUpdate [<SwitchParameter>]
@{Text=}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-PackageManagementProvider <String>
Specifies the name of the Package Management provider.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ProviderName <String[]>
Specifies one or more package provider names to which to scope your package search. You can get package
provider names by running the Get-PackageProvider cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Proxy <Uri>
@{Text=}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ProxyCredential <PSCredential>
@{Text=}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-PublishLocation <String>
Specifies a location for publishing the package.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-RequiredVersion <String>
Specifies the exact allowed version of the package that you want to install. If you do not add this parameter,
Install-Package installs the newest available version of the package that also satisfies any maximum version
specified by the MaximumVersion parameter.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-RoleCapability <String[]>
@{Text=}
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Scope <String>
Specifies the scope to which to install the package. The acceptable values for this parameter are:
- CurrentUser
- AllUsers
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ScriptPublishLocation <String>
Specifies the script publish location.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-ScriptSourceLocation <String>
Specifies the script source location.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-SkipDependencies [<SwitchParameter>]
{{Fill SkipDependencies Description}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-SkipPublisherCheck [<SwitchParameter>]
@{Text=}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-SkipValidate [<SwitchParameter>]
{{Fill SkipValidate Description}}
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-Source <String[]>
Specifies one or more package sources. Multiple package source names must be separated by commas. You can get
package source names by running the Get-PackageSource cmdlet.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Tag <String[]>
Specifies one or more strings to search for in the package metadata.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Type <String>
Specifies whether to search for packages with a module, a script, or both. The acceptable values for this
parameter are:
- Module
- Script
- All
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
SoftwareIdentity[]
NOTES
Example 1: Install a package by package name
PS C:\\>Install-Package -Name "DSCAccelerator" -Credential "CONTOSO\\TestUser"
This command installs a package named DSCAccelerator. When you run this command, you are prompted to provide a
password for the account that has rights to install the package.
Example 2: Install a package that you find with Find-Package
PS C:\\>Find-Package "zoomit" | Install-Package
This command installs a package named zoomit by piping the package from a Find-Package command.
Example 3: Install packages by specifying a range of versions
PS C:\\>Install-Package -Name "DSCAccel" -MinimumVersion 2.1.2 -MaximumVersion 2.2
This command installs any package that has a name matching the partial name DSCAccel. The command installs the
newest version of the package, within a range of versions that is specified by adding the MinimumVersion and
MaximumVersion parameters.
RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=517138
about_PackageManagement
Get-Package
Find-Package
Save-Package
Uninstall-Package