Hi all,
I am trying to help a fellow system engineer identify AppV 5 sequences that failed to publish.
In the Event Viewer only errors stating the number of failed sequences are logged.
While it would be usefull to identify which sequence didn’t publish correctly.
I must admit that I am somewhat of a Powershell beginner.
I deducted that the add-appvclientpackage cmdlet always runs fine. Our AppV Package Source Root resides in D:\App-V. Therefor I constructed the line:
$AddedSequences = Get-ChildItem -Path 'D:\App-V' -Directory -Recurse -Depth 0 -Force | select Name
On a reference machine the output of $AddedSequences gives me all sequences in D:\App-V:
Name
----
08799A87-DDAF-41DD-A25F-B579A3408C36
24BEBB35-1576-4D8F-B034-EECD4BA3B919
3F59F89C-45F3-4996-B0AB-17631338BD4C
758FF2CC-D6D6-4495-9C88-A2384F7A78AE
BBE27694-F927-43C5-AEC8-E67C841351C6
I also deducted that the result of the Get-AppvClientPackage cmdlet will give me the succceeded sequences:
$PublishedSequences = Get-AppvClientPackage * | select PackageID
On a reference machine the output of $PublishedSequences gives me all published sequences:
PackageId
---------
bbe27694-f927-43c5-aec8-e67c841351c6
3f59f89c-45f3-4996-b0ab-17631338bd4c
758ff2cc-d6d6-4495-9c88-a2384f7a78ae
Not really knowing how to proceed I wrote the next line giving me only the missing sequences. I added the $_.InputObject part after reading some internet posts.
$MissingSequences = Compare-Object $AddedSequences $PublishedSequences | ForEach-Object { $_.String }
On a reference machine the output of $MissingSequences gives me all unpublished sequences:
Name
----
758FF2CC-D6D6-4495-9C88-A2384F7A78AE
BBE27694-F927-43C5-AEC8-E67C841351C6
Now I am stuck on the last part… an AppV 5 DisplayName (which I want as output) resides in the folderstructure D:\App-V\[PackageID]\[VersionID] in a file called appxmanifest.xml in the node Properties \ DisplayName.
I want to have only the folders from the unpublished sequences as a start, then go to the corresponding appxmanifest.xml and read the proper node. And then output the DisplayName of the unpublished sequences
I have read about Select-Object, Select-Xml, Where-Object, [xml], [string], foreach … but I need a little nudge in the right direction. How to tie this all together?