object_name - property in ROOT\WMI namespace

object_name in other namespaces

List of classes with object_name local property in ROOT\WMI namespace

propertyClassOrigin
object_nameclustered_columnstore_index_rebuildclustered_columnstore_index_rebuild
object_nameddl_with_wait_at_low_priorityddl_with_wait_at_low_priority
object_namemetadata_create_global_temp_objectmetadata_create_global_temp_object
object_namemetadata_create_local_temp_objectmetadata_create_local_temp_object
object_namemetadata_delete_global_temp_objectmetadata_delete_global_temp_object
object_namemetadata_delete_local_temp_objectmetadata_delete_local_temp_object
object_namemetadata_name_lookup_failedmetadata_name_lookup_failed
object_namemodule_endmodule_end
object_namemodule_startmodule_start
object_nameobject_alteredobject_altered
object_nameobject_createdobject_created
object_nameobject_deletedobject_deleted
object_namepreconnect_completedpreconnect_completed
object_namepreconnect_startingpreconnect_starting
object_nameprogress_report_online_index_operationprogress_report_online_index_operation
object_namequery_post_compilation_showplanquery_post_compilation_showplan
object_namequery_post_execution_showplanquery_post_execution_showplan
object_namequery_pre_execution_showplanquery_pre_execution_showplan
object_namerpc_completedrpc_completed
object_namerpc_startingrpc_starting
object_namesp_cache_hitsp_cache_hit
object_namesp_cache_insertsp_cache_insert
object_namesp_cache_misssp_cache_miss
object_namesp_cache_removesp_cache_remove
object_namesp_statement_completedsp_statement_completed
object_namesp_statement_startingsp_statement_starting
object_namesql_statement_recompilesql_statement_recompile
object_namesql_transactionsql_transaction

Code samples for object_name property

Get instance of WMI class using GetObject, object_name property of query_pre_execution_showplan

Short VBS code - get a single specified instance of query_pre_execution_showplan class or get a default unnamed instance (singleton) of the class, using one single command GetObject with exact path of the wmi object.

'https://wutils.com/wmi/
Dim wmiObject
Set wmiObject = GetObject( _
 "WINMGMTS:\\.\ROOT\WMI:" + _
 "query_pre_execution_showplan.PropertyName=""SomeText""")
Wscript.Echo wmiObject.object_name 'or other property name, see properties
See more VBS samples of query_pre_execution_showplan class

WMI query - sample windows WQL with C#, object_name property of query_pre_execution_showplan

Get a specified instance of query_pre_execution_showplan by a key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this c# sample code.
See in another language: VBScript, VB.Net.
//https://wutils.com/wmi/

//Project -> Add reference -> System.Management
//using System.Management;

//create a management scope object
ManagementScope scope = new ManagementScope("\\\\.\\ROOT\\WMI");

//create object query
ObjectQuery query = new ObjectQuery("SELECT * FROM query_pre_execution_showplan Where PropertyName=\"SomeText\"");

//create object searcher
ManagementObjectSearcher searcher =
                        new ManagementObjectSearcher(scope, query);

//get a collection of WMI objects
ManagementObjectCollection queryCollection = searcher.Get();

//enumerate the collection.
foreach (ManagementObject m in queryCollection) 
{
  // access properties of the WMI object
  Console.WriteLine("object_name : {0}", m["object_name"]);
  
}

WMI query - sample windows WQL with VB.Net, object_name property of query_pre_execution_showplan

Get a specified instance of query_pre_execution_showplan by a key, get a default unnamed instance (singleton) of the class or list instances of the class by wmi query using this VB.Net sample code.
See in another language: VBScript, C#
'Project -> Add reference -> System.Management
'Imports System.Management

'Get the namespace management scope
Dim Scope As New ManagementScope("\\.\ROOT\WMI")

'Get a result of WML query 
Dim Query As New ObjectQuery("SELECT * FROM query_pre_execution_showplan Where PropertyName="SomeText"")

'Create object searcher
Dim Searcher As New ManagementObjectSearcher(Scope, Query)

'Get a collection of WMI objects
Dim queryCollection As ManagementObjectCollection = Searcher.Get

'Enumerate wmi object 
For Each mObject As ManagementObject In queryCollection
  'write out some property value
  Console.WriteLine("object_name : {0}", mObject("object_name"))
Next
comments powered by Disqus
WUtils.com