Some time ago I created a PowerShell documentation script for an App-V server infrastructure. I reworked it with much effort in December 2019. Many functions that were previously mapped via the script have migrated into the module. In its current state the module is especially good for extracting information from the ".AppV" file but also for extracting information from the external configuration files UserConfig.xml and DeploymentConfig.xml.

Still the legal stuff: We do not give any warranty for the function or damages. The module is licensed under the MIT license. Program errors are not excluded.This year we plan to add more features to the module. First of all you can do some nice things with the module. You can download the module at the bottom of this blog. Alternatively you can download the current version from the PowerShell Gallery. If you install the module in UserScope (and PoSh 5.x) the package will be under Documents\WindowsPowerShell\Modules with the following command:

install-Module AppVForcelets -Scope CurrentUser

The command will always install the latest version. However, this is not necessarily active after installation. If a version is already installed or an update is to be installed, this can be done with these commands:

#Installs the new version
Update-Module -Name AppVForcelets  -Scope CurrentUser 
#Remove Module form Memory
Remove-Module AppVForcelets
Import-Module AppVForcelts
#Show active module version
get-Command -Module AppVForcelets

Also here you can still find old versions in the module directory! So if you want to be sure, use the version via

Import-Module <path>

For esample: Import-Module $PSScriptRoot\..\AppVForcelets -force

Commands in the module:

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Convert-AppVPath                                   1.3        AppVForcelets
Function        Convert-AppVVFSPath                                1.3        AppVForcelets
Function        Get-AppVDeploymentConfigInfo                       1.3        AppVForcelets
Function        Get-AppVIconsFromPackage                           1.3        AppVForcelets
Function        Get-AppVManifestInfo                               1.3        AppVForcelets
Function        Get-AppVUserConfigInfo                             1.3        AppVForcelets

Get-ManifestInfo is used to read from an ".AppV" file. Get-AppVDeploymentConfigInfo and Get-AppVUserConfigInfo are used to evaluate the external configuration files. With Get-AppVIconsFromPackage and Save-AppVIncons the icons of the applications can be saved from an AppV file. I plan to use this information for an automated publishing for the Citrix Terminal Servers of our customers. The two Convert functions convert App-V paths to VFS and physical paths. This is also necessary information for automated Citrix publishing. Here are some examples of what the module can do (depending on the size of the content store, this may take some time) For more output use the -Verbose parameter.

Display of packages with services:

Get-ChildItem "$Depot\*.appv" -Recurse | Get-AppVManifestInfo |Where-Object {$_.HasServices}|  Select-Object -Property Name, HasShellExtensions, HasServices
Name                       HasShellExtensions HasServices
----                       ------------------ -----------
Adobe Acrobat DC für STW01               True        True
AcrobatReader_10                        False        True
Adobe_PS_CS4                            False        True
Acrobat_Pro_2015                         True        True
Corel_PSP_X5                             True        True

Display all packages with SxSAssemblys:

$Depot = <Pad auf Euer Freigabeverzeichnis>
Get-ChildItem "$Depot\*.appv" -Recurse | Get-AppVManifestInfo | Where-Object {$_.HasSxSAssemblys } | Select-Object -Property Name,SxSAssemblys

Display of packages with user scripts in the package:

Get-ChildItem "$Depot\*.appv" -Recurse | Get-AppVManifestInfo | Where-Object {$_.HasUserScripts } | Select-Object -Property Name, ConfigPath 
Name      ConfigPath
----      ----------
WireShark C:\AppVPakete\WireShark\WireShark_4_6.appv

Now an example for finding scripts via the external manifest:

Get-ChildItem "$Depot\*deploymentConfig.xml" -Recurse | Get-AppVDeploymentConfigInfo | Where-Object {$_.HasUserScripts -or $_.HasMachineScripts } | Select-Object -Property Name,ConfigPath
Name             ConfigPath
----             ----------
Acrobat_Pro_2015 C:\AppVPakete\BGETEM_Global_Acrobat_Pro_2015\Acrobat_Pro_2015\Acrobat_Pro_2015_DeploymentConfig.xml
Firefox57        C:\AppVPakete\Firefox57\SkripteimPaket\Firefox57_DeploymentConfig.xml
Firefox57        C:\AppVPakete\Firefox57\Firefox57_DeploymentConfig.xml
XMind_3.5.3.0    C:\AppVPakete\old.DeploymentConfig.xml
XMind_3.5.3.0    C:\AppVPakete\XMind_3.5.3.0_DeploymentConfig.xml

Among other things we can display packages with shell extensions or like here the largest file in each package:

Get-ChildItem "$Depot\*.appv" -Recurse | Get-AppVManifestInfo | Select-Object -Property Name, MaxfileSize, MaxfilePath | Sort-Object -Property MaxfileSize -Descending
Name                               MaxfileSize MaxfilePath
----                               ----------- -----------
Acrobat_Pro_2015                     567044665 Root/Setup%20Files/%7BAC76BA86-1033-FFFF-7760-0E0F06755100%7D/Data1.cab
Camtasia                             263998976 Root/VFS/Windows/Installer/39f26b.msi
vSphere_Client_5.1                   232073216 Root/VFS/Windows/Installer/5512b.msi
ideaJ                                187353753 Root/VFS/ProgramFilesX64/Java/jdk-10.0.1/lib/modules
AcrobatReader_10                     126301733 Root/VFS/Common%20AppData/Adobe/Setup/%7BAC76BA86-7AD7-1031-7B44-AA1000000001%7D/Data1.cab
DudenKorrektor                       126197760 Root/VFS/Windows/Installer/45b1e.msi
Gimp2                                 97523613 Root/VFS/Windows/Installer/584119.msi

Finally, we extract all icons from an App-V repository:

#Get All icons ans save
# First create Directory
if(-not (Test-Path $("$env:USERPROFILE\desktop\out\"))) {
  New-Item $("$env:USERPROFILE\desktop\out\") -ItemType Directory  
}

Get-ChildItem "$Depot\*.appv" -Recurse | Get-AppVManifestInfo  | ForEach-Object `
 {Save-AppVIcons -Path $_.ConfigPath -Iconlist $_.Shortcuts -ImageType ico -DestinationPath $("$env:USERPROFILE\desktop\out\" + $_.name + ".ico") -Verbose}

So completely without pictures is also not nice but of course it's usual with PowerShell blogs. But I always try to be a bit creative besides the technical stuff as you can see on my blog pictures rendered with Blender :-) Therefore a picture must be included.This is what it looks like when you completely unlist your App-V content directory and extract all icon files:

 Extracted App-V Icons

The next blog will publish the script for the AppV server report. There all packages and settings of the packages will be compared.

Manual download:

App-V Forcelets