I am looking for a method to update the content so that sccm will get the new files from the source location and updates the new revision in all the assigned DP's
Via Console we can do this by right clicking on the "Deployment Type" and then click the "Update Content"
I am thinking there should be a method or property in "DeploymentType" or "ScriptInstaller" class but I dint find any thing.
Any one have any idea on this?
- Edited by Kumar Mudedla Wednesday, October 02, 2013 4:51 AM
I am coding in C# so looking for c# code not the Powershell Cmdlet
I found that we have to call a method called "RefreshPkgSource" in "SMS_ContentPackage" class to update the content but not sure what is going on I am getting an exception "You do not have security rights to perform this operation." but I do have rights to do that from SCCM Console Application Management.
IResultObject objSMSContentPackage = Connection.GetInstance(@"SMS_ContentPackage.PackageID='" + PackageID + "'"); Dictionary<string, object> emptyparams = new Dictionary<string, object>(); objSMSContentPackage.Get(); objSMSContentPackage.ExecuteMethod("RefreshPkgSource", emptyparams);
I am getting the below exception while Executing the "RefreshPkgSource" method.
Description = "User \"****\\******\" does not have permissions to modify packages."; //***removed my account name hare
ErrorCode = 1112017920;
File = "e:\\qfe\\nts\\sms\\siteserver\\sdk_provider\\smsprov\\ssppackage.cpp";
Line = 2547;
ObjectInfo = "2";
Operation = "ExecMethod";
ParameterInfo = "SMS_ContentPackage.PackageID=\"P0000161\"";
ProviderName = "WinMgmt";
StatusCode = 2147749889;
- Edited by Kumar Mudedla Sunday, September 29, 2013 5:37 PM