4 Replies Latest reply on Jan 18, 2019 9:29 AM by Mike Poole

    Customised Patch Analysis output (NSH script)

    Mike Poole
      Share This:

      I have to run several Patch Analysis Jobs everyday, against different groups of servers.


      To help with this I created a small NSH script where I basically specify the Server Smart Group which gets copied to the Execution Task targets, runs the associated Job and then outputs the results.


      However - is there anyway to change or customise the output ?


      I'm using:


      blcli_execute Utility simpleExportPatchAnalysisRun $SERVER_NAME $JOB_GROUP $JOB_NAME $JOB_RUN_ID "c:/outputfile.csv"


      This saves the whole analysis job - so lists every update status for every server and this can be quite large (and also has an issue where it "wraps" the description for any missing patches onto the next line so it's difficult to import it into Excel.


      What I actually want is the summary view that is shown when viewing the PAJ results in the console. If I select Successful Servers against a PAJ for example it just shows:


      Server Name, Missing Hotfix Count, Missing Bulletin Count, Installed Hotfix Count, Installed Bulletin Count


      Is there anyway to just get this view exported rather than the "full" analysis report ?



        • 1. Re: Customised Patch Analysis output (NSH script)
          Bill Robinson

          there's a new blcli in that should do this:


          blcli Utility simpleExportPatchAnalysisRun $JOB_GROUP $JOB_NAME $JOB_RUN_ID


          for some reason it didn't make the release notes or the blcli docs.

          • 2. Re: Customised Patch Analysis output (NSH script)
            Mike Poole

            Hi Bill,


            That's the job I'm running but the results I see are not that different from "exportPatchAnalysis", apart from the addition of a device mapping area. There is an "Export Results Table:" section but this is blank (is this because we aren't on SP3 as yet ?):



            Simple PatchAnalysis Export Version 1.0


            Job Name:,analysis-2000029-Patch_Analysis_20122018-10-05 08-28-22-544+0100

            Missing Hotfixes:,8

            Missing Bulletins:,0

            Installed Hotfixes:,640

            Installed Bulletins:,0

            Not Scanned Machine:,1

            Scanned Machine:,2



            Mapping: Device_1->server1.fqdn

            Mapping: Device_2->server2.fqdn

            Mapping: Device_3->server3.fqdn


            Export Results Table:


            Patch Details:

            Status,Server,Name,QNumber,Severity,Bulletin ID,CVE Id,IAVA ID,Product,Status,Instance,Description,Reason

            • 3. Re: Customised Patch Analysis output (NSH script)
              Bill Robinson

              sorry about that - i pasted the wrong command:

              # blcli_execute Utility simpleExportPatchAnalysisRunSummary "/Workspace/Patching Jobs" "Windows 2016" 2004428

              SERVER,Missing Hotfixes,Missing Bulletins,Installed Hotfixes,Installed Bulletins



              (i didn't have a multi-server result handy in this env)

              • 4. Re: Customised Patch Analysis output (NSH script)
                Mike Poole

                Thanks Bill - that's exactly what I was looking for.


                Just need to wait until we've upgraded to SP3 Patch1