Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create an automation to update applications that are in ConfigMgr? #165

Open
deilsoncso opened this issue Feb 1, 2022 · 7 comments

Comments

@deilsoncso
Copy link

I searched everywhere, searched for articles, looked at some open and closed issues and didn't find the answer to my question.

for example, I select 10 apps from the list, they are downloaded and then deployed to ConfigMgr\RuckZuck for example, how do I make these apps update with each new version of an app or schedule on specific days that the RuckZuck update these apps already published in ConfigMgr?

I'm aware I think it doesn't just update the content, it creates a new entry in Applications\RuckZuck with the new version in front of the name. But I just wanted to make sure they were automatically updated and on the days they are scheduled, just go to Applications\RuckZuck and remove the previous versions.

@rzander
Copy link
Owner

rzander commented Feb 2, 2022

Same as #84
MECM is a tool to manage Enterprise customers and I don't think they want to rollout applications without reviewing and testing...

For smaller customers, you can run RZGet.exe to update a set of Apps on a schedule directly on the clients (they will bypass MECM for these Updates)... Or my personal favorite, ROMAWO , a RuckZuck Sponsor with a solution to update 3rd party apps...

@TheTaran
Copy link

TheTaran commented May 24, 2023

I searched everywhere, searched for articles, looked at some open and closed issues and didn't find the answer to my question.

for example, I select 10 apps from the list, they are downloaded and then deployed to ConfigMgr\RuckZuck for example, how do I make these apps update with each new version of an app or schedule on specific days that the RuckZuck update these apps already published in ConfigMgr?

I'm aware I think it doesn't just update the content, it creates a new entry in Applications\RuckZuck with the new version in front of the name. But I just wanted to make sure they were automatically updated and on the days they are scheduled, just go to Applications\RuckZuck and remove the previous versions.

I have done that with PowerShell. That's pretty simple. If you need some code, let mi know.

@Keywan2009
Copy link

Hi TheTaran,

could you help with Code? I have the same issue.

Regards

@TheTaran
Copy link

TheTaran commented Apr 9, 2024

RuckZuck_AppUpgrade.zip
@Keywan2009 This is my script.

When you import a new application from RuckZuck, it creates Collections under the folder /RuckZuck.
To successfull execute the scriptpt you need a collection namend 'All_Windows_Server' (or change the name in the script) and 2 folders under Applications:
/RuckZuck
/Supersedence
At the end of the script at the position '#check collection query rules, if not exist create' you can add aditional lines with Applications you want.

edit: i will try to upload my script.

@Keywan2009
Copy link

Hi,
Thank you for the Code.
Some question
Where should I run that PW Script? Manually or how?

I have to change only this both line?

$SiteCode = "X00" # Site code
$ProviderMachineName = "SERVERNAME.fqdn" # SMS Provider machine name

and for example the following

if ($collection -like "7-Zip") { $AppName = "7-Zip(MSI)"; $AppSQL = "7-Zip%" }

@TheTaran
Copy link

TheTaran commented Apr 9, 2024

Where should I run that PW Script? Manually or how?

You need to run that script on your SCCM Server with PowerShell. Manually oder by scheduled task. Dependes on your requirements.

I have to change only this both line?

$SiteCode = "X00" # Site code
$ProviderMachineName = "SERVERNAME.fqdn" # SMS Provider machine name

and for example the following

if ($collection -like "7-Zip") { $AppName = "7-Zip(MSI)"; $AppSQL = "7-Zip%" }

Yes correct.

@Keywan2009
Copy link

Keywan2009 commented Apr 9, 2024

Thank you again
I have Ruckzuck version 1.7.2.5 and I renamed the AppFolder and CollectionFolder to "bagsbunny"
And I have remove for testing an the end of your script all the Apps and keep only "7-Zip"

#check collection query rules, if not exist create
Write-Host "check collection query rules" -fo Yellow
foreach($collection in $collections) {
if ($collection -like "7-Zip") { $AppName = "7-Zip(MSI)"; $AppSQL = "7-Zip%" }

    $collectionname = $collection.Name
        if ($collectionname -eq ("AppAto " + $AppName)) { 
            foreach ($Appl in $CMRZAPPS ) {
            if ((($Appl).SDMPackageXML | Foreach { ([xml]$_).AppMgmtDigest.Application.CustomProperties.Property } | Where-Object { $_.Name -eq "Shortname" }).Value -eq $AppName )
            { #get app Verion
                $Appversion = $Appl.SoftwareVersion
                $rzappname = $Appl.LocalizedDisplayName
                Write-Host "create collection query for $collectionname - $rzappname - $Appversion" -fo yellow
                #write-host "$rzappname - $Appversion"
                remove-CMDeviceCollectionQueryMembershipRule -CollectionName $collectionname -RuleName ApplicationQuery -Force
                $wql = "select SMS_R_System.ResourceId, SMS_R_System.ResourceType, SMS_R_System.Name, SMS_R_System.SMSUniqueIdentifier, SMS_R_System.ResourceDomainORWorkgroup, SMS_R_System.Client from  SMS_R_System inner join SMS_G_System_INSTALLED_SOFTWARE on SMS_G_System_INSTALLED_SOFTWARE.ResourceID = SMS_R_System.ResourceId where SMS_G_System_INSTALLED_SOFTWARE.ARPDisplayName like '$AppSQL' and SMS_G_System_INSTALLED_SOFTWARE.ProductVersion < '$Appversion'"
                Add-CMDeviceCollectionQueryMembershipRule -CollectionName $collectionname -QueryExpression $wql -RuleName "ApplicationQuery"
                Write-Host "create collection query for $collectionname - finish" -fo Green
            }
    }
}

}
Write-Host "check collection query rules - finish" -fo Green

#################

If I run now the PW Script, I am getting the error

Write-Host "check collection query rules - finish" -fo Green
`
Incomplete string token.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : IncompleteString

Any Idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants