Cleanup-OnIsleAppV.ps1

This unsigned powershell script is useful on App-V 5 client machines that are used by a single user.  It performs the following tasks:

Syntax/Example

PoweShell.exe -File Cleanup-OnIsleAppV.ps1 [-CloseTimeoutSec <int>] [-DontRemoveData] [-DisplayActionsOnly]

Parameters

CloseTimeoutSec 

Optional integer parameter. If any packages/groups are open, this parameter specifies the number of seconds to wait before killing the apps. 

This allows you to decide to kill the script via CTRL+C. 

The default value of CloseTimeoutSec is 5 seconds when not specified.

 

DontRemoveData 

Optional switch parameter without a value to indicate that the removal of application related data should not occur. 

The default is to also remove the appliation related data when not spcified.

 

DisplayActionsOnly 

Optional switch parameter without a value to indicate that potential actions should be displayed and not executed. 

The default is to perform the removals.


NOTES

Tested on 5.0 SP3, it should work on 5.0 and above.  While 5.1 is not yet out, probably on that also. 

This script cannot handle packages and groups assigned to other users individually.

 

Updated Sept 26, 2015.  Works with App-V 5.1 also.

 

AUTHOR

Tim Mangan / TMurgent Technologies 

June 27, 2015