Hello, I'm trying to get the Set-CMProgram powershell cmdlet to work. What I'm trying to do is turn on the option to Suppress Program Notifications on all packages that have been migrated from SCCM 2007-2012.
At this stage I'm trying to run a powershell command to do this on one program for one package but cant get this to work.
I've tried getting a program from an existing package via:
$pkg=Get-CMProgram -packageid "XXX00179" -ProgramName "Install"
and then various combinations using -inputobject to turn on suppress but keep getting binding errors as below
Set-CMProgram -InputObject $pkg -StandardProgramName SPM -SuppressProgramNotifications $True
Set-CMProgram : Cannot bind argument to parameter 'InputObject', because PSTypeNames of the argument do not match the
PSTypeName required by the parameter: IResultObject#SMS_Package.
Does anyone know how to set options on an existing program using the above commands or have a better way of doing this?
Thanks
Carl