Font size: +
2 minutes reading time (346 words)

App-V Link Cleanup Script


Again and again we had to find out that sometimes App-V shortcuts in the user profile or even globally on the back. This can happen for various reasons. In particular, after a missing unpublishing for a user even if the package no longer exists. For nonpersistent VDI or Terminal Server this is no problem in the global context under C:\ProgramData\Microsoft\Windows\Start Menu\Programs, because the systems are always in their original state after a reboot.For user profiles, however, this is a problem.
Since I have a little more time right now, I finally get to publish the script I created a long time ago for this problem.


How do I use this?The script can be included in the logon or logoff script or run independently. It can also be used via the Task Scheduler.Important is, it must run in the user context for links in the user directory and in the system context for the links of the system.The call Clean-AppVLinks.ps1 only cleans up the start menu.

App V Cleanup Script

Command Line Switches:

  • -Desktop # also cleans up the user's desktop.
  • -CleanUpEmptyFolders # If a folder is empty or becomes empty, the CleanUpEmptyFolders option deletes it
  • -Global # Additionally the global folders are viewed and cleaned (also the desktop if -Desktop is set)
		delete all orphan app-v shortcuts of unpublished App-V applications
        In App-V remain for a unpublishing sometimes shortcuts on the desktop or are in the Start menu 
        (because of Profile Management or in use etc). This script looks which applications are published 
        and delete the shortcuts of unreleased packages

	.PARAMETER  -Desktop
		-Desktop : Clean up App-V Desktop icons

	.PARAMETER  -Global
		-Global : Clean up Global links (c:\programdata\Microsoft\Windows\start menu, c:\Users\Public\Desktop)
        Need to run as Administrator

	.PARAMETER  -CleanUpEmptyFolders
		-CleanUpEmptyFolders : Not an App-V Feature. Search for every empty folder in the "Start Menu" with the exception of "Autostart" and "Startup" and delete these folders.
        After a app-v synchonisation the App-V links are deletet. With exception of the parent folder

        & Clean-AppVLinks.ps1 -Global -Desktop
        & Clean-AppVLinks.ps1 -Desktop

     Andreas Nick 2020 without warranty




zipApp_V-Cleanup-PowerShell-Script HOT

Created 21.04.2020 14:40:35
Changed 21.04.2020 14:40:38
Version 1.0
Size 10.42 KB
Created by Andreas Nick
Changed by Andreas Nick
Downloads 345
License Nick Informationstechnik Tool LicenceTooltip

Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

Recipe: Virtualize Edge with App-V
OTPEdit a management tool for One Time Passwords

Related Posts



No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Wednesday, April 24, 2024

Captcha Image

@nickinformation Tweets

My german Blog:


We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.