It's in the SDMPackageXML property of the deployment type object.

You'd have to get creative, but it should be doable.

This post may be of some assistance.
http://www.david-obrien.net/2013/04/set-cmdeploymenttype-via-powershell-for-configmgr-2012/

As an example I added a 33 as success in my deployment type. You can see it
simply added <item>33</item> to the <arg name="SuccessExitCodes"
Type="Int32[]"> property.

[image: Inline image 3]

[image: Inline image 2]



On Tue, Apr 7, 2015, 9:33 PM Robert Spinelli <[email protected]
<https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>>
wrote:

> Yep, that’s what I’m looking to do via PowerShell, don’t want to do it
> manually.
>
>
>
> *From:* [email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>
> [mailto:[email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>]
> *On Behalf Of *Freddy Grande
> *Sent:* Tuesday, April 7, 2015 6:41 PM
>
>
> *To:* [email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>
> *Subject:* RE: [mssms] Return Codes - PowerShell - SCCM 2012
>
>
>
> Is it an option to add the return code to the app deployment type
> properties? You can add custom exit codes or modify current ones so SCCM
> interprets different exit codes as success/fail etc.
>
>
>
>
>
> Freddy
>
>
>
> *From:* [email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>
> [mailto:[email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>]
> *On Behalf Of *Robert Spinelli
> *Sent:* Wednesday, 8 April 2015 1:55 AM
>
>
> *To:* [email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>
> *Subject:* RE: [mssms] Return Codes - PowerShell - SCCM 2012
>
>
>
> We have a few legacy apps that have return codes other then 0 for
> success.  I don’t want to have to repackage them or use a wrapper script,
> just want to use PowerShell to set the custom return code to ‘Success (no
> reboot)’.  I can manually set it for the dozen or so apps we have like
> this, but would like to know how/if this is possible via PS, since I
> couldn’t figure out how to do it.  Was hoping someone else has already done
> this via PS.
>
>
>
> *From:* [email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>
> [mailto:[email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>]
> *On Behalf Of *Marable, Mike
> *Sent:* Tuesday, April 7, 2015 11:39 AM
> *To:* '[email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>
> '
> *Subject:* RE: [mssms] Return Codes - PowerShell - SCCM 2012
>
>
>
> The app returns a 15 when it successfully installs?
>
>
>
> How is it being deployed?  If you have a wrapper script that could receive
> the RC=15 from the application’s installer and then return a “0” back to
> SCCM.
>
>
>
> Mike
>
>
>
> *From:* [email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>
> [mailto:[email protected]
> <https://mail.google.com/mail/?view=cm&fs=1&tf=1&[email protected]>]
> *On Behalf Of *Robert Spinelli
> *Sent:* Tuesday, April 07, 2015 11:33 AM
> *To:* mssms
> *Subject:* [mssms] Return Codes - PowerShell - SCCM 2012
>
>
>
> Anyone know how to modify/add return codes for a deployment type?  If we
> have an app that needs return code 15 = Success (no reboot) is that
> something that I can set via PowerShell?  I can’t seem to find how to do
> this.
>
>
>
> Thanks
>
>
>
> Rob
>
>
>
> **********************************************************
> Electronic Mail is not secure, may not be read every day, and should not
> be used for urgent or sensitive issues
>
>
>
>
>
>
>



Reply via email to