JustinK Posted August 21, 2014 Report post Posted August 21, 2014 Hey All. I've been working on an otherwise simple runbook in Orchestrater that gathers all the auto deployment rules, checks their associated Deployment Package that they download updates to, and updates said packages to the correct "year" to help alleviate that otherwise annoying manual process of maintaining Update package sizes. I ran into a final problem however: when it's time to create a "new" software update package I can't figure out any way to do it form the command line. Creating a new one from the GUI seems to only be doable by editing an existing or creating a new ADR. However, if I try to use New-CMSoftwareUpdateAutoDeploymentRule the only flag I can seem to use is -DeploymentPackageName which requires the package to have already been created. More frustrating is that trying to query the cmdlets directy to manipulate the packages: get-CMSoftwareUpdateDeploymentPackage set-CMSoftwareUpdateDeploymentPackage remove-CMSoftwareUpdateDeploymentPackage huh ... no add ... no new .... no "start" even. Is there anyway to create these things systematically? Perhaps even with a WMI call? My goal is to setup soem runbooks that query the current year and possibly current size of the packages and create new deployment packages when certain size limits are hit. Most of it was easy ... this last it is ... annoying. Quote Share this post Link to post Share on other sites More sharing options...
JustinK Posted August 21, 2014 Report post Posted August 21, 2014 Bah .. sometimes the right Google query answers the question. Those curious we can make them with a WMI query: $Arguments = @{Name = $Name;Description = $Description;PkgSourceFlag = 2;PkgSourcePath = $Source} Set-WmiInstance -Namespace "Root\SMS\Site_$SiteCode" -Class SMS_SoftwareUpdatesPackage -Arguments $Arguments -ComputerName $SiteServer -ErrorAction STOP In the above string I'm using variables for Name, Description, and Source Directory, as well as Site Server and site code. Now I just have to distribute that package and I'm good to go. Home stretch here I come! Quote Share this post Link to post Share on other sites More sharing options...