Solved

SCCM 1607 - Update content on application by powershell

Posted on 2016-09-19
2
364 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 18

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

717 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