2 Replies Latest reply on Feb 14, 2019 1:33 AM by Andrew Waters

    WMI query function

    Viktor Marinov

      Hello Andrew Waters,

       

      with WMI query function we can get info like this:

       

                  wmiQuery := "SELECT Version FROM cim_datafile where name='%cmd_line%'";

                  log.debug("wmiQuery is: %wmiQuery%");

                  wmi_results := discovery.wmiQuery(host, wmiQuery, wmiNS);

       

      Can we also use WMI functions?

       

      The target is to get permissions for Windows shares and according MS docs Win32_Share.GetAccessMask call give the info and should be used like:

       

      Set objShare = objWMIService.Get("Win32_Share.Name='TestShare'")

      Return = objShare.GetAccessMask

      WScript.Echo Return

       

       

      With ADDM function we can get only attribute values, am I right?

      If yes do you know any other way getting the permissions with on-board functions?

       

      :-)

       

      Very best regrads and thank you in advance!