Note that there are some explanatory texts on larger screens.

plurals
  1. POuninstalling applications using SCCM SDK
    primarykey
    data
    text
    <p>I have been trying to uninstall applications on devices or users using SCCM. I have been successful in creating an application assignment that would install applications, but I haven't been able to get it to uninstall. The code I have been using is:</p> <pre><code>IResultObject assignment = this.manager.CreateInstance("SMS_ApplicationAssignment"); IResultObject application = this.manager.GetInstance("SMS_Application.CI_ID=16777339"); assignment["ApplicationName"].StringValue = application["LocalizedDisplayName"].StringValue; assignment["AssignedCI_UniqueID"].StringValue = application["CI_UniqueID"].StringValue; assignment["AssignedCIs"].IntegerArrayValue = new[] { application["CI_ID"].IntegerValue}; assignment["AssignmentName"].StringValue = "Deepak's deployment"; assignment["CollectionName"].StringValue = "Deepak's Collection of Devices"; assignment["DisableMomAlerts"].BooleanValue = true; assignment["NotifyUser"].BooleanValue = false; assignment["OfferFlags"].IntegerValue = 0; assignment["DesiredConfigType"].IntegerValue = 1; assignment["OverrideServiceWindows"].BooleanValue = false; assignment["RebootOutsideOfServiceWindows"].BooleanValue = false; assignment["SuppressReboot"].IntegerValue = 0; assignment["TargetCollectionID"].StringValue = "UKN0000F"; assignment["EnforcementDeadline"].DateTimeValue = DateTime.Now.AddDays(1); assignment["StartTime"].DateTimeValue = DateTime.Now; assignment["UseGMTTimes"].BooleanValue = false; assignment["UserUIExperience"].BooleanValue = false; assignment["WoLEnabled"].BooleanValue = false; assignment["RequireApproval"].BooleanValue = true; assignment["OfferTypeId"].IntegerValue = 2; assignment.Put(); </code></pre> <p>This code will put up the application as an install deployment in SCCM. How do I get it as an uninstall deployment? There is an <code>AppAction</code> enumeration, which I suspect is used by the client and not on the server.</p> <pre><code>typedef enum AppAction { appDiscovery = 0, appInstall = 1, appUninstall = 2 } AppAction; </code></pre> <p>Any help would be appreciated!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload