Skip to main content

Posts

Showing posts from September, 2022

ServiceNow GlideAggregate: count number of Azure tables in the cmdb meeting a certain criteria

  var gaAzure = new GlideAggregate ( 'cmdb_ci' ); var sQuery = 'sys_class_nameLIKEazure^operational_status=1^sys_updated_on<javascript:gs.beginningOfLast9Months()^discovery_source=NULL^ORdiscovery_source=Unknown' ; gaAzure . addEncodedQuery ( sQuery ); gaAzure . addAggregate ( 'COUNT' , 'sys_class_name' ); gaAzure . query (); var dupls =[]; dupls . push ( "tables:" ); while ( gaAzure . next ()) { var tableLine = gaAzure . getAggregate ( "COUNT" , "sys_class_name" ) + " => " + gaAzure . getElement ( "sys_class_name" ) + "\n" ; dupls . push ( tableLine ); } gs . print ( dupls );   (ServiceNow )

ServiceNow update large number of Azure classes in the cmdb to non-operational

  function updateCIs ( batch ) { gs . log ( 'START...' , ' fixscript -retire Azure classes' ); var grAzure = new GlideRecord ( 'cmdb_ci' ); var sQuery = 'sys_class_nameLIKEazure^operational_status=1^sys_updated_on<javascript:gs.beginningOfLast9Months()^discovery_source=NULL^ORdiscovery_source=Unknown' ; grAzure . addEncodedQuery ( sQuery ); grAzure . orderBy ( 'sys_class_name' ); grAzure . setLimit (); grAzure . query (); gs . print ( 'TOTAL COUNT=' + grAzure . getRowCount ()); var si = new hmcts_tool_improvement (); var iCount = 0 ; while ( grAzure . next ()) { var sTable = grAzure . sys_class_name + "" ; if ( sTable . indexOf ( 'azure' ) > - 1 ) { try { si . GRskipBRs ( grAzure ); //--skip business rules grAzure . operational_status = '2' ; //--non-...

ServiceNow Instance Troubleshooter Application - SUPPORT

  https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0870978 Instance Trouble shooter Application Provided free by ServiceNow Needs activation of Plugin "Instance Troubleshooter". Any user with Scan User (scan_user) / System Admin (admin) role can run it on a Instance. Once plugin is installed it is available under "Instance Troubleshooter" Menu "Get Started" menu would allow us to see the 19 troubleshoot categories Access Control Lists Authentication Clone Core Platform Currency Discovery Email Forms and Fields Import / Export MID Server Mobile Performance Performance Analytics Reporting Service Catalog Service Portal SLA User Experience Workflow Each Category has set of checks that can be performed under that category Access Control Lists checks for High Security Settings plugin disabled ACLs using getRowCount may cause performance issue ACLs without role...