Description of the Issue

When converting large batches of Application Virtualization (App-V) 4.6 Packages to 5.0 PowerShell can sometimes have memory issues.  This issue happens more frequently for cumulative package sizes ~>50GB.

This is an example of the command that can result in a System.OutOfMemoryException error:

Get-ChildItem %SystemDrive%\original_4.6 | ConvertFrom-AppvLegacyPackage -DestinationPath %SystemDrive%\converted_5.0_SP2_CTP %temp%\log.txt

Actions Required to Resolve the Issue

These are the workarounds for this issue:

  1. Convert the Packages in smaller batches (less than 50GB), OR
  2. Increase the PowerShell internal memory limit from 1024MB (default for v3.0)

 

Convert the Packages in smaller batches (less than 50GB)

  • Obtain a list of the Packages, including size, on the local machine’s source directory.

  • Group the Packages into batches of no greater than 50GB.  Copying these into separate directories would be a good intermediate step.

  • Execute the ConvertFrom-AppvLegacyPackage PoSH Cmdlet on each package grouping.

 

Increase the PowerShell internal memory limit from 1024MB (default for v3.0)

Complete the following steps to increase the internal memory limit: http://blogs.technet.com/b/heyscriptingguy/archive/2013/07/30/learn-how-to-configure-powershell-memory.aspx