2 minutes reading time (346 words)

App-V Link Cleanup Script

Grid-und-Blitz2_Gross_b

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.


Clean-AppVLinks.ps1

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)
<#
	.SYNOPSIS
		delete all orphan app-v shortcuts of unpublished App-V applications
	.DESCRIPTION
        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

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

	.NOTES
		
	.LINK
		    
  .AUTOR 
     Andreas Nick 2020 without warranty

#>

 

Files:

App_V-Cleanup-PowerShell-Script

Information
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 52
License Nick Informationstechnik Tool LicenceTooltip
Price

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

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Already Registered? Login Here
Guest
Thursday, 26 November 2020

Captcha Image

@nickinformation Tweets

My german Blog: 

http://www.software-virtualisierung.de

in 

Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information