Microsoft

System Center Configuration Manager Feedback

Suggestion box powered by UserVoice

How can we improve Configuration Manager?

Allow "uninstall content settings" to be modified using PowerShell

Monthly updating of applications like FlashPlayer, Java, Chrome, Reader DC, Office 365 Client, etc. are repetitive and tedious, so I like to automate monthly applications updates as much as possible. When creating a new application using powershell, I cannot set the "Uninstall content setting" located under the Deployment Type and the Content tab. This allows me to save on downloading large sets of files to uninstall when either an "MSIEXEC /X {GUID}" handles it with no files required, or something like Office 365 Client where 1.5 GB is needed to install, but only 5MB or so to uninstall.

The command I figure this should be a part of is both, "Add-CMMsiDeploymentType" and "Set-CMMsiDeploymentType". Something like "-UninstallContentSetting" with set values of : <SameContent | NoContent | DifferentContent>. Then you'd need another parameter to specify the location if you choose "DifferentContent", something like "-UninstallContent" or alias "-UninstallContentLocation" with a <String> path to the folder.

Without this command capability automation is broken and I have to manually make the change. (I do have automation breaks with Detection Methods and Requirements as well due to complexity of trying to use the PS method, but back to the point). If I've missed something and this is indeed available already, do let me know how to do it.

11 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Roth, Chase shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

4 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Roth, Chase commented  ·   ·  Flag as inappropriate

    Thanks for your efforts. I'd appreciate that and even if it is ugly, I don't have to look at it once it is running. :-)

  • Paul Wetter commented  ·   ·  Flag as inappropriate

    Yes. Completely agree. I was posting more for if it’s something you’d need today and can’t wait for the dev cycle, it would be an option, albeit not a great one. :-). I’ll look for some sample code and try to get it your way. Haven’t messed with it in a while so going to have to do some digging. I’ll warn that it will not look pretty...

  • Roth, Chase commented  ·   ·  Flag as inappropriate

    I am not sure how to use that or even really how to better look into that further, but I'll search a bit. I am not familiar or even remotely good at understanding how to use .Net classes directly as I don't have that scripting/programming background. I could probably manipulate someone else's code if I find an example of how to do it.

    Nonetheless, if that is troublesome or takes you down a convoluted path to achieve the goal the long term would still probably be best they add it to PowerShell cmdlets directly for ease of use.

  • Paul Wetter commented  ·   ·  Flag as inappropriate

    I’ve done some of this before there were cmdlets for most of this. You may have to look at the object “Microsoft.ConfigurationManagement.ApplicationManagement.ScriptInstaller”. Look at the properties for that. I’ve used “InstallContent” for my past scripts. You may be looking at the “UninstallContent” property. It can get messy, but is likely possible

Feedback and Knowledge Base