- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 03:31 AM
Hi All,
I want to find a table in service now where all the plugins that have installed are stored as records. I want to write a script that automatically verifies the plugins installed but I couldn't find any table where all the plugins that I installed are present. I referred to sys_upgrade_history,v_plugin,sys_plugins but in these only few plugins installed were there not all. Attaching the sample code below.
(function() {
// Array of plugin IDs and their names
var plugins = [
{id: 'sn_fin', name: 'Finance Common Architecture'}
];
// Initialize the output string with headers
var output = 'Plugin ID\tPlugin Name\tStatus\n';
// Iterate over each plugin and check its status
plugins.forEach(function(plugin) {
var gr = new GlideRecord('sys_upgrade_history');
gr.addQuery('to_version', plugin.id);
gr.query();
if (gr.next()) {
output += plugin.id + '\t' + plugin.name + '\tInstalled\n';
} else {
output += plugin.id + '\t' + plugin.name + '\tNot Installed\n';
}
});
// Print the output
gs.info(output);
})();
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 10:03 AM
@rajan_singh Please refer to see this support article and see if it helps https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0678767
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0727844
Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 10:03 AM
@rajan_singh Please refer to see this support article and see if it helps https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0678767
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0727844
Hope this helps.