# encoding: ascii
# api: powershell
# title: 
# description: App-V 5.0, create friendly folder names for packages. Requires PowerShell Community Extensions.
# version: 0.1
# license: CC0
# x-poshcode-id: 4574
# x-archived: 2016-12-25T13:18:12
#
#
$FriendlyFolderName = "MyFriendlyAppV"
$appvroot = $(Get-Itemproperty HKLM:\SOFTWARE\Microsoft\AppV\Client\Streaming).PackageInstallationRoot
$appvPSroot = $appvroot.Replace('%programdata%',$env:ProgramData)

Get-AppvClientPackage | ForEach-Object {
    $targetpath = $appvPSroot + '\' + $_.PackageID.ToString() + '\' + $_.VersionID.ToString()
	$Path = "C:\ProgramData\" + $FriendlyFolderName + "\" + $_.Name
	New-Junction -LiteralPath $Path -TargetPath $targetpath
}
