question

BillLund-8475 avatar image
0 Votes"
BillLund-8475 asked IanXue-MSFT answered

Looking for examples or more detailed info on MECM PowerShell cmdlets ???-CMTSStepInstallApplication

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

windows-server-powershell
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered

Hi,

You can get the information on the cmdlets from the below links or by running Get-Help -Full.
https://docs.microsoft.com/en-us/powershell/sccm/overview
https://docs.microsoft.com/en-us/powershell/module/configurationmanager/

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.