Solved

SCCM 1607 - Update content on application by powershell

Posted on 2016-09-19
2
225 Views
Last Modified: 2016-09-19
Hi,

Once per month I would like a script to download the newest content to our Office 365 suite and thereafter update the content in SCCM 1607. The first part is done. Now I need to update the content of an existing application in SCCM, which I normally do by right-clicking on the application and choose "Update content" and then thereafter remove the old revision of the application.

Does any of you guys know how to do this?
0
Comment
Question by:Sum Wum
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
Mike T earned 500 total points
ID: 41805577
Hi,

That would be in PowerShell and a short script, since you want to retire the old version. Given you have 1607 you ought to have the latest cmdlets available which are improving frequently.

The latest is for 1604 so is dated 6/6/2016 - Update Release, version 5.0.8373.1189 and has bug fixes.
Documentation + download Link: https://technet.microsoft.com/en-us/library/dn958404

You need to find out the package name and then it's easy enough:
 Start-CMContentDistribution -ApplicationName "Office365" -CollectionName "All Systems" -DistributionPointName "yourDPservername.CORP.COM" -DistributionPointGroupName "DistPointGroup"

This will update the named group of DPs with new content that you have changed in the application (object) Office365.

I don't know any cmdlet to remove old revisions as there's nothing listed in the docs. It is simple enough to do that as a monthly housekeeping task. (I take it you mean application revision history?).

Mike
0
 
LVL 1

Author Comment

by:Sum Wum
ID: 41805952
Hi Mike,

Thanks! That helped alot. Here is what I ended up with for Office x86 if anyone else could use it. I'll let it run once per month as a scheduled task to update the Office suite and all the other Office applications that we use.

Set-Location -Path "X:\Path\Microsoft Office Suite\2016\x86\"
Remove-Item -Path .\Office -Force -Recurse
Start-Process -FilePath .\setup.exe -ArgumentList "/download .\Download.xml" -Wait -NoNewWindow -PassThru
$ApplicationName = "Microsoft Visio Pro 2016 x64"
$DeploymentType = Get-CMDeploymentType -ApplicationName $ApplicationName
Update-CMDistributionPoint -ApplicationName $ApplicationName -DeploymentTypeName $DeploymentType.LocalizedDisplayName

# Here we go through all the applications and remove all the revisions that is not in use
$SCCMApps = Get-CMApplication
foreach ($SCCMApp in $SCCMApps)
{
      $SCCMAppRevision = $SCCMApp | Get-CMApplicationRevisionHistory
      for ($i = 0;$i -lt $SCCMAppRevision.Count-1;$i++) {Remove-CMApplicationRevisionHistory -name $SCCMApp.LocalizedDisplayName -revision $SCCMAppRevision[$i].CIVersion -Force}
}
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question