Setting 'Distribute the content for this package to preferred distribution points' checkbox with PowerShell?

Set-CMPackage has a ton of switches, but I do not see one for this specific checkbox. 

Tooling around with the Get-CMPackage, I see that PkgFlags gets set to a specific value, namely add 1073741824 to whatever the current value is. I guess I could go this route, but I'd like something simpler so I don't need to retrieve this value, add the values, and put the values. 

Thoughts?

December 13th, 2013 5:11pm

Hi Jason,

as far as I know, this is only possible by changing the Flags on a package (somebody correct me if I am wrong). I found the easiest way to work around this is to create a default package, switch everything on and off the way you want and then check the database for the correct / current Flag. You could then use that in your scripts.

Free Windows Admin Tool Kit Click here and download it now
July 10th, 2015 9:14am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics