public static void QueryInstanceSync(CimSession cimSession, string cimNamespace)
 {
     try
     {
         string query = QueryInstanceCore();
         IEnumerable<CimInstance> queryInstances = cimSession.QueryInstances(cimNamespace, "WQL", query);
         foreach (CimInstance cimInstance in queryInstances)
         {
             // Use the instance
             PrintCimInstance(cimInstance);
         }
     }
     catch (CimException ex)
     {
         PrintCimException(ex);
     }
     catch( Exception ex)
     {
         Console.WriteLine(ex.Message);
     }            
 }