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?
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
# 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-CMApplicationRevisionH
for ($i = 0;$i -lt $SCCMAppRevision.Count-1;$
}