none
Powershell - How to use New-CMTSStepInstallSoftware cmdlets ? RRS feed

  • Question

  • Dears,

    I am trying to add packages from an excel files to a newly task sequence, the goal is to modify this excel file (with packages name) and use it to add packages to our different task sequences

    When I try to use this cmdlets : New-CMTSStepInstallSoftware (which is provided by SCCM cmdlets)

    I get this error : 

    New-CMTSStepInstallSoftware : Cannot bind argument to parameter 'Program', because PSTypeNames of the argument do not match the PSTypeName required by the parameter: IResultObject#SMS_Program.

    Someone can tell me how to use it ? Checked on M$ website itself for example, without success...

    Tuesday, July 10, 2018 1:50 PM

Answers

  • Get it working !

    -Program should be used with (Get-CMProgram -PackageID -ProgramName) like :

    New-CMTSStepInstallSoftware -Name "TEST" -Program (Get-CMProgram -PackageId DTC001E1 -ProgramName install)

    Thanks

    • Marked as answer by Romain Wager Wednesday, July 11, 2018 7:54 AM
    Wednesday, July 11, 2018 7:54 AM