Powershell Scripts For Testing App-V Packages

I thought I’d share these as some of you may find them useful! When I am testing App-V packages, I generally either have them on a network share in one folder, or have copied them to my desktop, and want a simple way to add and remove them. These Powershell scripts do just this:

  • Add-AppvPackages.ps1 – Searches recursively for all .appv files under the same folder as the script, adds them (without config files), and publishes them globally.
  • Remove-AppvPackages.ps1 – Looks for all published App-V packages, and Stops/Repairs/Unpublishes/Removes any that have the path of the .appv file matching a package foundĀ under the same folder as the script.

Both scripts do these jobs in one line of code, even though that makes them harder to read! But then there are a few lines to relaunch the script with admin rights, which ruins my single-line elegance, but makes it much easier to use. For example, copy these scripts and a bunch of packages to your desktop, right-click the script and select Run with Powershell, and it will automatically prompt for elevation if you have UAC turned on (which you should).

Download them here.

 

Leave a Reply