This is a small collection of PowerShell scripts that I have put together that I use when working with App-V. Download them Here
This script is designed to clear the app-v cache on a machine for both globally published and user published applications. The first thing the script does is get the SID for the currently logged in user.
If the $repair variable has been set to $true then it will attempt to repair all connection groups and packages before removing them.
Once the script has the currently logged in user it will then disable all connection groups that are enabled for the current user followed by attempting to remove all connection groups. It will then do the same for Packages. It will get all the packages and attempt to unpublish them for the current user before removing them. After removing connection groups and packages from the current use the script will then attempt to do the same for the connection groups and packages that are globally published.
When you run the script you will get a number of errors displayed in the PS console. This is to be expected as the script is not attempting to be overly intelligent about whether a packaged is published in either the user or Global context. That might come in a future version.
When working with the built in PowerShell I often find that I am scrolling up and down looking for the information about Packaged or Connection Groups, so this script is designed to condense the information into a smaller view.
This Script will read the connection group templates from the local device “%programdata%\Microsoft\AppV\Client\Catalog\PackageGroups” directory and will display the CG information followed by the PackageName, PackageID, VersionID, IsOptional values for each package in the Connection Group.
For the Connection Group itself it will show you the Name, GroupID, VersionID, Priority, IsEnabledGlobally, IsEnabledToUser, InUse and InUseByUser.
Nothing fancy here. This script will get all of the packages and connection groups on the device and display their % Loaded value.