Plugins update with Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2023 11:34 PM
Is there any way the plugins can be updated using background scripts, other than directly updating from UI or downloading it from store?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 11:51 PM
Still working on that Frank 😉
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2024 11:39 PM - edited 02-07-2024 01:12 AM
HI @Jeffrey Barton @HDLawrence ,
I found this script from @Maik Skoddow for installing plugins he shared on LinkedIn , I am yet to use it but kindly let us know your results as well.
https://github.com/mskoddow/sn-scripts/blob/master/install_plugins_and_applications.js
Please mark helpful/correct if my response helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 07:39 AM
That's a really neat script. Great find. And thanks to @Maik Skoddow for publishing that. Works great.
I'm looking for a script that can update plugins and applications and that one filters those out.
Will continue searching and update if I find/write anything useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2024 05:30 AM
Dug through the script includes that @Maik Skoddow referenced. There are functions available for updating plugins as well. Here's a short little script that runs through and updates all available plugins. I have it referencing a specific sys_properties record where I store a list of plugin ID's that we don't want automatically updated in this script.
Hope this helps!
//First, query a list of all plugins that can be updated.
var availPlugins = new GlideRecord('sys_store_app');
availPlugins.addEncodedQuery('hide_on_ui=false^update_available=True');
availPlugins.query();
gs.log('Starting plugin update cycle','Plugin Update Process');
//Second, define variables, pull skip list from properties
var skipProperty = new GlideRecord('sys_properties');
skipProperty.get('06fe09951b528e10c8e062007e4bcb3b');
var skipList = skipProperty.value;
var report = 'Plugin update report: \n';
var worker = new sn_appclient.AppUpgrader();
//Third, loop through all plugins to update them while skipping plugins listed on the skip list
while(availPlugins.next()){
if(skipList.indexOf(availPlugins.source) == -1){
report = report.concat('Updated ' + availPlugins.source) + ' from ' + availPlugins.version + ' to ' + availPlugins.latest_version + '\n';
worker.upgrade(availPlugins.sys_id.toString(), availPlugins.latest_version, false);
} else {
report = report.concat('Skipped ' + availPlugins.source) + '\n';
}
}
//Fourth, send report to sys_log
gs.log(report,'Plugin Update Process');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 03:20 PM