So I have the code to create a new script setting on a CI working, but now I can't add a CI to a baseline with a script. I can code it, but I wanted to first see if anyone got this code working:
Set-CMBaseline -Name "BASELINE NAME" -AddRequiredConfigurationItems "CI_ID" I get the error: Set-CMBaseline : ConfigMgr Error Object: instance of SMS_ExtendedStatus { Description = "The digest is not valid"; ErrorCode = 1078462235; File = "e:\\qfe\\nts\\sms\\siteserver\\sdk_provider\\smsprov\\sspconfigurationitem.cpp"; Line = 2142; Operation = "PutInstance"; ParameterInfo = ""; ProviderName = "ExtnProv"; StatusCode = 2147749889; }; At C:\Users\sccmadmin\Desktop\CreatePrinters.ps1:169 char:9 + Set-CMBaseline -Name "Printer - $PrinterName" -AddRequiredConfigurationI ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (Microsoft.Confi...BaselineCommand:SetBaselineCommand) [Set-CMBaseline], WqlQueryException + FullyQualifiedErrorId : UnhandledExeception,Microsoft.ConfigurationManagement.Cmdlets.Dcm.Commands.SetBaselineCommand I can probably do the same thing I did before with this stuff (manually edit the SDMPackageXML code) but don't want to reinvent the wheel. On Mon, Dec 15, 2014 at 1:40 PM, Ryan <ryan2...@gmail.com> wrote: > > There are no options to configure the CI, only create it. > > I found some information here that is pointing me in the right direction I > think... > > > http://www.dexterposh.com/2014/07/powershell-sccm-2012-add-setting-to-ci.html > > > > On Mon, Dec 15, 2014 at 1:26 PM, Mike Dzikowski < > sccmlist-mikedzikow...@outlook.com> wrote: > >> New-CMConfigurationItem >> >> http://technet.microsoft.com/en-us/library/jj870915.aspx >> >> >> Mike D- >> >> ------------------------------ >> Date: Mon, 15 Dec 2014 09:53:14 -0600 >> Subject: [mssms] Powershell to create CI? >> From: ryan2...@gmail.com >> To: mssms@lists.myitforum.com >> >> Does anyone know how to use Powershell to create a script Configuration >> Item? >> >> I'm trying to write a script that will pull all printers in from a print >> server and create a configuration item per printer to install the printer. >> Then it would create Collections and baselines and deployments so we just >> need to drop a computer in a collection for it to get a certain printer. >> >> It looks like CIs follow the same format as Applications, so I'm not >> expecting much in terms of being able to do this. I already tried to create >> a template, export the template as a cab, and then use find/replace in the >> two xml files to change printer names. Once I put those files back in a >> cab, I can only import them again if I remove the original CI. It always >> gives the CI the same Unique ID as is specified in the XML files, so I >> can't duplicate the template. >> >> >> >> >> >