Pushing Converted Intune Packages

Pushing Converted Intune Packages

NOTE

The Chocolatey Intune integration shipped as part of v3.0.0 of the Chocolatey Licensed Extension.

NOTE

The Chocolatey Intune integration requires a valid Chocolatey for Business or Chocolatey for Business Trial license.

Summary

The ability to push Chocolatey Intune packages (packages with the extension .intunewin) has been added to the push command. The command will push the specified Chocolatey Intune package, any dependencies specified for the package along with the core Chocolatey Intune packages of chocolatey, chocolatey-license and chocolatey.extension when the packages do not already exist on the Intune tenant. The chocolatey-license package will be automatically generated using the Chocolatey for Business license that is present on the local computer running the push command, if it does not exist in the Intune tenant.

Usage

Command Line

choco push <path to intune pkg> [<options/switches>]

When using the push command the package path provided must be an .intunewin file that was previously converted to a Chocolatey Intune package using the `convert` command. This will push the Chocolatey Intune package, and its dependencies if they do not already exist there, to the Intune tenant.

Context Menu

When you right-click on a Chocolatey Intune package (which is a package with the extension of .intunewin), select Upload/Push Intune Packageā€¦ to push the package to the Intune tenant. Alternatively, you can double-click the Chocolatey Intune package to upload it, and all of its dependencies, to the Intune tenant.

Dependency Resolving

When resolving dependencies for the Chocolatey Intune package, Chocolatey will look for the dependency package(s), with the same ID and within the version range, in order in the locations below:

  1. The Intune tenant.
  2. The path of the package you want to push.

If no packages are found in these locations, the push command will fail, and the error will state the dependency package that cannot be found.

Examples

choco push firefox.86.0.intunewin --source=<INTUNE TENANT GUID> --api-key=<TENANT CLIENT ID>:<TENANT CLIENT SECRET>

To use a source and api-key without specifying them each time, set them in the Chocolatey config using:

choco config set --name=intuneTenantGUID --value=<INTUNE TENANT GUID>
choco apikey --source=<INTUNE TENANT GUID> --key=<TENANT CLIENT ID>:<TENANT CLIENT SECRET>

Once that is done you can push the package as normal:

choco push firefox.86.0.intunewin

WARNING

By specifying the path to a pre-release package, pre-release support will be enabled for the package and its dependencies. However, while the package you are pushing can be a pre-release, you cannot have a dependency on a pre-release package if the Chocolatey package you are pushing is a stable release. This is the same behaviour as the `convert` command.

WARNING

If this is the first time pushing a package to your Intune tenant, make sure that you also have the converted packages of chocolatey and chocolatey.extension available in the same directory as the package you want to push.

NOTE

If a package for chocolatey-license does not already exist on the specified Intune tenant, a new package will be created using the Chocolatey for Business license that is present on the local computer the command is run from.

FAQ

Frequently asked questions about choco push for Intune can be found here