Using the OneGet App-V Provider

Once you have the App-V OneGet/Microsoft Package Management provider installed, how the heck do you use it?!

The App-V provider supports locating, installing and uninstalling App-V 5.x packages from a file path/share (the use of HTTP/S streaming is not supported). To be able install App-V packages we first need to tell the provider where it can find packages.

Note: The following screenshots were taken from a Windows 8.1 x64 WMF 4.0 machine with the OneGet experimental build installed.

Registering a App-V Package Source

Before the App-V provider can locate any packages, you need to register one or more package sources. By default, the only package source that is registered automatically is the App-V Package Source Root, but only if present in the App-V client configuration.

Each package source requires at least a name and location. When registering a package source you will also need to tell OneGet what provider the source is associated with. The following shows adding a local folder as an App-V provider package source.

Register-PackageSource

In addition, each package source can be trusted (they’re not by default). If a package source is untrusted – like the Chocolatey public feed – you will see a prompt when installing packages. When a package source is trusted, you are not prompted when installing packages. The examples shown here do not utilise a trusted package source.

Discovering App-V Packages

The OneGet/Package Management will search all registered package sources by default. For example, searching for ‘Chrome’ will search Chocolatey, the PSGallery and the ‘DropBox’ package source for packages matching ‘Chrome’.

findpackagechrome

That’s quite a few packages and we certainly would not want to install all of them! Fortunately, Find-Package supports filtering packages by provider, version and/or source.

findpackagechromeprovider

findpackagechromesource

findpackagechromeversion

The versioning semantics of App-V packages with OneGet/Package Management will probably be the subject of another blog post. Note: the package summary is read directly from the App-V package description – you do add a description to each sequence right?!

Installing App-V Packages

All packages are installed with the OneGet/PackageManagement Install-Package cmdlet – regardless of provider. There are two primary ways of installing available App-V packages with the App-V provider; Find-Package and Install-Package.

The Install-Package cmdlet will take the output of the Find-Package cmdlet via the pipeline. Therefore, we can install the ‘Microsoft Expression Web’ App-V package using this method.

Note: there are only calls to Get-AppvClientPackage to show that there was nothing registered in the App-V client before Install-Package was run and that the package was registered afterwards. The Get-AppvClientPackage commands are not required!

findpackageinstallpackage

Package names can also be specified on the Install-Package cmdlet itself. This also supports the
–ProviderName, -Source and/or –RequiredVersion switches to filter the installation source etc.

findpackageinstallpackageprovider

Removing App-V Packages

There may be occasions when you might need to remove an App-V package or two. The great thing about the OneGet/Package Management module is that it will enumerate packages registered in the App-V client – regardless of installation method. Therefore, if you already have App-V packages registered, you can still use the App-V OneGet provider without having to make any changes :).

The following example depicts that nothing is registered in the App-V client at first, then Notepad++ is registered outside of OneGet via the native App-V cmdlets and is still detected.

AddAppvClientPackage_GetPackage

Packages can be removed either using the Uninstall-Package cmdlet or piped from the Get-Package cmdlet into the Uninstall-Package cmdlet. The following command will uninstall all registered App-V packages.

UninstallPackage

Unregistering Package Sources

As and when you need to remove package sources, you can use the Unregister-PackageSource cmdlet with the package source name.

UnregisterPackageSource

Note: the OneGet/Package Management App-V provider does not currently support the –Location parameter of the Unregister-PackageSource cmdlet. It is on the backlog and we are working on it 😉

Summary

Remember that this is an open-source project. This means that if there are changes you would like to see implemented or you have found a bug, head over to the project site and start to contribute!

Installing the OneGet App-V Provider

The Microsoft Application Virtualization (App-V) 5.x provider for OneGet can be installed in numerous ways depending on the version of the Windows Management Framework (WMF) installed and/or whether you have the OneGet/Microsoft Package Management bits installed.

Prerequisites

Duh?! The OneGet/Package Management module and the App-V 5.x client of course!

Everything you need is included in the Windows Management Framework 5.0 April 2015 (or later) preview. If you don’t want to install the full WMF 5.0 preview you can download and install the latest experimental OneGet build instead on Windows 7 and upwards.

Note: due to internal namespace changes you will need to have OneGet version 1.15.122.18327 or later installed.

Quick Install

If you have installed WMF 5.0 or the OneGet experimental bits you should be able to install the module via the Powershell Gallery. This process may change once we can get the provider natively bootstrapping. We’re working with @fearthecowboy on this – so watch this space!

To get busy, trying running Install-Module –Name AppvProvider

Manual Install

Until the bootstrapping is working you can manually download and install the provider without having to use PowershellGet.

  1. Download the latest provider release from GitHub.
  2. Unblock the .zip file.
  3. Extract the .zip file contents into the %ProgramFiles%\WindowsPowershell\Modules.

Appv Provider Modules

Is It Working?!

To determine whether you have followed the above instructions correctly and everything is working, fire up a Powershell prompt and run the Get-PackageProvider cmdlet. All being well, you should see the App-V provider listed:

Get-PackageProvider

 

Once you have the provider installed, you can find more details on how to use it in the Using the OneGet App-V Provider post.

Summary

Remember that this is an open-source project. This means that if there are changes you would like to see implemented or you have found a bug, head over to the project page and start to contribute!

App-V Package Management Provider

Appv Provider Project Home Page
Appv Provider Project Home Page

Virtual Engine are proud to announce that we have open-sourced a new Microsoft App-V 5.x OneGet/Package Management provider on GitHub.

This provider complements the built-in providers shipping in the latest Windows Management Framework 5.0 preview, enabling a unified approach to managing package installs on networked computers.  Here is a brief description of OneGet from the online Powershell help.

OneGet is a unified interface for software package management systems; you can run OneGet cmdlets to perform software discovery, installation, and inventory (SDII) tasks. Regardless of the underlying installation technology, you can run the common cmdlets in OneGet to search for, install, or uninstall packages; add, remove, and query package repositories; and run queries on a computer to determine which software packages are installed.

For more information, check out Installing the OneGet App-V Provider and Using the OneGet App-V Provider blog posts.

As this is an open-source project we would love to see the App-V and Powershell communities get involved and contribute. For more information about getting started, check out the project page and join in the fun!

Let’s Get Chocolatey

It’s taken a little while, but we are pleased to announce that the Virtual Engine Toolkit (VET) and the App-V Configuration Editor (ACE) are now available on Chocolatey! If you have Chocolatey installed on your systems then you can get going by running the commands listed below.

image

Microsoft Package Management

It gets even better if you’re running the Windows 10 Insider preview, the latest WMF 5.0 April 2015 preview or have installed the latest experimental OneGet build on Windows 7 and up, you can download these directly – today!

To do this, run the Install-Package ace or Install-Package vet commands, like so:

image
Other Packages

It doesn’t end here though. We have also published the following packages that you might find useful to the public Chocolatey feed:

Now – go get Chocolatey 😀