A community where customers and the community can provide feedback to make a better product for everyone! For more details on how we prioritize request, please see:
It may not be desirable to distribute all applications configured in PatchMyPC to all the globally configured Distribution Groups for reasons of cross-border compliance, limited storage and bandwidth etc. and some application may only be needed in specific Distribution Groups and not in others.
#regex match - example "Microsoft Edge" catches both "Microsoft Edge" and "Microsoft Edge WebView2 Runtime"
$Applications=@(
"Google Chrome"
"Microsoft Edge"
"Adobe Acrobat Reader"
"Microsoft Power BI Desktop"
"WebEx"
"Zoom Meetings"
)
$Applications = $Applications -join "|"
#Update Targeted to number of dps that works to your env
$NewPMPC = Get-CMDistributionStatus | where {($_.SoftwareName -match "$Applications") -and ($_.Description -like "Created by Patch My PC*") -and ($_.DateCreated -gt ((Get-date).AddDays(-3))) -and ($_.Targeted -lt 69)}
$Output = @()
foreach($App in $NewPMPC){
try{
#Update -DistributionPointGroupName
#(Get-CMDistributionPointGroup).name
Start-CMContentDistribution -ApplicationName $App.softwarename -DistributionPointGroupName "I like turtles"
$Output += "`n$($App.SoftwareName)`n"
}catch{
$ErrorMessage = $Error | out-string
#$ErrorMessage | Send-MailMessage or log
exit
}
}
#$Output | Send-MailMessage or log