Looking to modify existing Task Sequences - to locate Install Application Actions containing Legacy Application and replace with current Application version.
I Get-CMApplication for both new & old, Return list of Task Sequences with old reference.
For each TS I Get-CMTSStepInstallApplication, returns WqlArray,
Foreach $App in AppArray, I check if $App.ApplicationName -eq $OldApp.ModelName... to locate the reference that need to be changed.
I cannot change the $App.AppInfo which I believe is another WqlArray.
However cannot change the element in the array.
I can manipulate the other elements of the App. However, the $AppArray.Replace() does not work with WqlArrays.
After building a new array to use with Set-CMTSStepInstallApplication, the process runs without error.
The Task Sequence last modified time changes in the console.
However, it does not appear to have changed any of the Install Application Actions.
I cannot locate any detailed info on these CMTSStepInstallApplication cmdlets nor examples which work. Also, info on Powershell & WqlArray Items.May be an issue with building new Array +=@($App) not being a WqlArray type...
Environment is MECM cb 2006, Powershell 5.1 on 2012R2