1

The code which I am using is able to show that the application has been deployed but it is not showing up in clients' software center.

IResultObject applicationAssignment = this.sccmConnection.CreateInstance("SMS_ApplicationAssignment");
DateTime time = DateTime.Now;
//// assign the application information to the assignment
applicationAssignment["ApplicationName"].StringValue = application.PropertyList["LocalizedDisplayName"];
applicationAssignment["AssignedCI_UniqueID"].StringValue = application.PropertyList["CI_UniqueID"];
applicationAssignment["AssignedCIs"].IntegerArrayValue = new int[] { int.Parse(application.PropertyList["CI_ID"]) };
applicationAssignment["AssignmentName"].StringValue = this.txtSCCMApplicationName.Text + "_Deployment";
////use the collection name
applicationAssignment["CollectionName"].StringValue = result.PropertyList["Name"];
applicationAssignment["DisableMomAlerts"].BooleanValue = false;
applicationAssignment["AssignmentDescription"].StringValue = "Created by a web form application";
//applicationAssignment["EnforcementDeadline"].DateTimeValue = time;
applicationAssignment["NotifyUser"].BooleanValue = true;
applicationAssignment["OfferFlags"].LongValue = 2;
applicationAssignment["DesiredConfigType"].LongValue = 1;
applicationAssignment["OverrideServiceWindows"].BooleanValue = false;
applicationAssignment["RebootOutsideOfServiceWindows"].BooleanValue = false;
applicationAssignment["RequireApproval"].BooleanValue = false;
applicationAssignment["StartTime"].DateTimeValue = time;
applicationAssignment["SuppressReboot"].LongValue = 0;
applicationAssignment["OfferTypeID"].LongValue = 2;
//applicationAssignment["Priority"].LongValue = 2;
////use the collection id
applicationAssignment["TargetCollectionID"].StringValue = result.PropertyList["CollectionID"];
applicationAssignment["UseGMTTimes"].BooleanValue = false;
applicationAssignment["UserUIExperience"].BooleanValue = true;
applicationAssignment["WoLEnabled"].BooleanValue = false;
applicationAssignment["LocaleID"].LongValue = 1033;
applicationAssignment.Put();
AustinWBryan
  • 3,249
  • 3
  • 24
  • 42
  • AFAIK, you can't. The SCCM client runs the check on a schedule based on a policy from the server, and even if you kick off the process manually the first thing it does is check system load, where it will often decide not to run at all. – Joel Coehoorn Jun 05 '18 at 18:06
  • When I redeployed the app but using SCCM and run client action, the app will show up in the software center – James Dominico Jun 05 '18 at 18:22

0 Answers0