NAME
Save-Package
SYNOPSIS
Saves packages to the local computer without installing them.SYNTAX
Save-Package [-AllVersions] [-AllowPrereleaseVersions] [-ConfigFile
] [-Confirm] [-Contains ] [-Credential
] [-FilterOnTag ] [-Force] [-ForceBootstrap] [-Headers ] [-LiteralPath
] [-Path ] [-Proxy ] [-ProxyCredential ] [-SkipValidate] [-WhatIf] [
] Save-Package [-AllVersions] [-AllowPrereleaseVersions] [-ConfigFile
] [-Confirm] [-Contains ] [-Credential
] [-FilterOnTag ] [-Force] [-ForceBootstrap] [-Headers ] [-LiteralPath
] [-Path ] [-Proxy ] [-ProxyCredential ] [-SkipValidate] [-WhatIf] [
] Save-Package [-AllVersions] [-Command
] [-Confirm] [-Credential ] [-DscResource
] [-Filter ] [-Force] [-ForceBootstrap] [-Includes {DscResource | Cmdlet | Function | Workflow | RoleCapability}] [-LiteralPath
] [-PackageManagementProvider ] [-Path ] [-Proxy ] [-ProxyCredential
] [-PublishLocation ] [-RoleCapability ] [-ScriptPublishLocation [
] [-ScriptSourceLocation ] [-Tag ] [-Type {Module | Script | All}] [-WhatIf] ] Save-Package [-AllVersions] [-Command
] [-Confirm] [-Credential ] [-DscResource
] [-Filter ] [-Force] [-ForceBootstrap] [-Includes {DscResource | Cmdlet | Function | Workflow | RoleCapability}] [-LiteralPath
] [-PackageManagementProvider ] [-Path ] [-Proxy ] [-ProxyCredential
] [-PublishLocation ] [-RoleCapability ] [-ScriptPublishLocation [
] [-ScriptSourceLocation ] [-Tag ] [-Type {Module | Script | All}] [-WhatIf] ] Save-Package [-AllVersions] [-Confirm] [-Credential
] [-Force] [-ForceBootstrap] -InputObject
[-LiteralPath ] [-Path ] [-Proxy ] [-ProxyCredential ] [-WhatIf] [
] Save-Package [-Name]
[-AllVersions] [-Confirm] [-Credential ] [-Force] [-ForceBootstrap] [-LiteralPath
] [-MaximumVersion ] [-MinimumVersion ] [-Path ] [-ProviderName {msi | NuGet | msu | Programs | PowerShellGet | psl | chocolatey}] [-Proxy
] [-ProxyCredential ] [-RequiredVersion
] [-Source ] [-WhatIf] [ ] DESCRIPTION
The Save-Package cmdlet saves packages to the local computer without installing them. This cmdlet saves the newest
version of a package unless you specify the AllVersions parameter. The DestinationPath and LiteralPath parameters are mutually exclusive, and cannot be added to the same command.PARAMETERS
-AllVersions [
] Indicates that this cmdlet saves all available versions of the package. By default, Save-Package only returns
the newest available version. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false-AllowPrereleaseVersions [
{{Fill AllowPrereleaseVersions Description}} Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Command
Specifies one or more commands included in the package. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-ConfigFile
{{Fill ConfigFile Description}} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Confirm [
Prompts you for confirmation before running the cmdlet. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Contains
{{Fill Contains Description}} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Credential
Specifies a user account that has rights to save a package from a specified package provider or source. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-DscResource
Specifies one or more Desired State Configuration (DSC) resources for the package.
Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Filter
Specifies a filter for the package. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-FilterOnTag
{{Fill FilterOnTag Description}} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Force [
Indicates that this cmdlet overrides restrictions that prevent the command from succeeding, as long as running the command does not compromise security. Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -ForceBootstrap [
Indicates that this cmdlet forces Package Management 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
{{Fill Headers Description}} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Includes
Indicates the resources that the package includes. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-InputObject
A software ID object that represents the package that you want to save. Software IDs are part of the resultsof the Find-Package cmdlet.
Required? true Position? named Default value None Accept pipeline input? True (ByValue) Accept wildcard characters? false-LiteralPath
Specifies the literal path to which you want to save the package. You cannot add both this parameter and the DestinationPath parameter to the same command. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-MaximumVersion
Specifies the maximum allowed version of the package that you want to save. If you do not add this parameter,Save-Package saves the highest available version of the package.
Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-MinimumVersion
Specifies the minimum allowed version of the package that you want to find. If you do not add this parameter,Find-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
Specifies one or more package names. Required? true Position? 0 Default value NoneAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-PackageManagementProvider
Specifies the Package Management provider. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Path
Specifies the path at which to save the package. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-ProviderName
Specifies one or more provider names. Required? false Position? named Default value NoneAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-Proxy
@{Text=} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-ProxyCredential
@{Text=} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-PublishLocation
Specifies the publish location. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-RequiredVersion
Specifies the exact version of the package to save. If you do not add this parameter, Save-Package finds the
highest available version of the provider 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
@{Text=} Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-ScriptPublishLocation
Specifies the script publish location. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-ScriptSourceLocation
Specifies the script source location. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-SkipValidate [
{{Fill SkipValidate Description}} Required? false Position? named Default value False Accept pipeline input? False Accept wildcard characters? false] -Source
Specifies one or more package sources. Required? false Position? named Default value NoneAccept pipeline input? True (ByPropertyName)
Accept wildcard characters? false-Tag
Specifies a tag to search for within the package metadata. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-Type
Specifies whether to search for packages with a module, a script, or either. Required? false Position? named Default value None Accept pipeline input? False Accept wildcard characters? false-WhatIf [
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] 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
You cannot pipe input to this cmdlet.OUTPUTS
This cmdlet does not generate any output.NOTES
Example 1: Save a package to the local computer
PS C:\>Save-Package -Name "DSCAccelerator" -DestinationPath "C:\Users\TestUser\Downloads"
This example saves the newest version of a package, DSCAccelerator, to the C:\Users\TestUser\Downloads folder.Example 2: Save an exact version of a package
PS C:\>Save-Package -Name "DSCAccelerator" -RequiredVersion "2.1.2" -DestinationPath "C:\Users\TestUser\Downloads"
This example saves only version 2.1.2 of a package, DSCAccelerator, to the C:\Users\TestUser\Downloads folder.Example 3: Save a package by piping results of Find-Package
PS C:\>Find-Package -Name "DSCAccelerator" -RequiredVersion "2.1.2" | Save-Package -DestinationPath
"C:\Users\TestUser\Downloads"This command saves a package named DSCAccelerator by first locating the exact package with the Find-Package
cmdlet, then piping the results of Find-Package to the Save-Package cmdlet.
Example 4: Save a package to a local folder, then install the package
PS C:\>Save-Package "notepad2" -DestinationPath "C:\temp"
PS C:\>Install-Package "C:\temp\notepad2.4.2.25.3.nupkg"
The first command saves a package to C:\temp, a folder on the local computer. The second command installs the saved package from the C:\temp folder, instead of installing from the web.RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/?LinkID=517140 about_PackageManagementGet-Package
Install-Package
Save-Package
Uninstall-Package