Image prep best practice: Flush your app-v client cache prior to seal

Flushing the App-V client cache

When creating a base operating  image for deployment to computers and you are including the App-V client might inadvertently launch an App-V application by mistake before you’ve completed capturing the image), you might find that the package is included in the capture and thus bloats the image unnecessarily. By flushing the App-V client cache before capturing, you can ensure that no packages are included in the image.

Prep step

Install your App-V client installed on a Windows 8.1/10 PC.

How to do

The following list shows you the high-level steps involved in this recipe and the tasks required to complete the recipe (all of the actions in this recipe will take place on the Windows 8.1/10 client):

  • Log in as an Administrator level id and flush the App-V Client Cache

To implement this do the following:

  1. On your Windows 8.1/10 client, log in with an account that has local administrator permissions.
  2. Launch an admin-level PowerShell session and enter the following commands:
    Set-ExecutionPolicy RemoteSigned –Force
    Import-Module AppvClient
    Get-AppvClientPackage –All | Remove-AppvClientPackage
    Set-ExecutionPolicy Default –Force
    

    Here, the first and last lines of the commands allow scripting to run within PowerShell and then set the scripting security settings back to their default. The second line imports the App-V commands into the PowerShell session and the third line retrieves a list of all of the App-V packages and then pipes them into a command to remove them from the client.

  3. To verify command ran successful, check the size of the C:\ProgramData\App-V folder; it should be nearly empty with only icons and shortcuts remaining for the packages that have otherwise been flushed out
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s