6 Replies Latest reply on Jul 3, 2018 8:53 AM by Gerardo Bartoccini

    Dealing with xml contents in compliance rules

    Gerardo Bartoccini

      I need to build some compliance rules for IIS.

      Some of the checks will require to invoke appcmd.exe which returns xml contents.

      BTW, they are not correct xml format, as they are not wrapped in a xml tag, so I managed to add <xml> tags as follows:


      nsh -c "cd //??TARGET.HOST??; echo \"<xml>\" && nexec -e cmd /C 'C:\windows\system32\inetsrv\Appcmd.exe list config' && echo \"</xml>\""


      This returns an xml output which I am parsing with xml.gm in an extended object:



      However, whatever I tried when building compliance rules fails.

      Any hints how to build one?


      Requirement is to check that all Value12 strings under "<add>" tags below "xml/system.webServer" contain "Microsoft.NET":