filegroup_id - property in ROOT\WMI namespace

filegroup_id in other namespaces

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

propertyClassOrigin
filegroup_idadd_file_in_masteradd_file_in_master
filegroup_iddatabase_agent_create_filegroupdatabase_agent_create_filegroup
filegroup_iddatabase_agent_drop_filegroupdatabase_agent_drop_filegroup
filegroup_idfile_added_in_databasefile_added_in_database
filegroup_idfile_readfile_read
filegroup_idfile_read_completedfile_read_completed
filegroup_idfile_read_enqueuedfile_read_enqueued
filegroup_idfile_read_throttledfile_read_throttled
filegroup_idfile_write_completedfile_write_completed
filegroup_idfile_write_enqueuedfile_write_enqueued
filegroup_idfile_write_throttledfile_write_throttled
filegroup_idfile_writtenfile_written
filegroup_idfile_written_to_replicafile_written_to_replica
filegroup_idfilegroup_name_changefilegroup_name_change
filegroup_idfilegroup_property_changefilegroup_property_change
filegroup_idlog_io_completelog_io_complete
filegroup_idphysical_filegroup_createphysical_filegroup_create
filegroup_idsort_add_run_tracingsort_add_run_tracing
filegroup_idsort_memory_grant_adjustmentsort_memory_grant_adjustment
filegroup_idsort_state_change_tracingsort_state_change_tracing
filegroup_idsort_statistics_tracingsort_statistics_tracing
filegroup_idvalidate_filevalidate_file

Code samples for filegroup_id property

Get instance of WMI class using GetObject, filegroup_id property of file_written

Short VBS code - get a single specified instance of file_written 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:" + _
 "file_written.PropertyName=""SomeText""")
Wscript.Echo wmiObject.filegroup_id 'or other property name, see properties
See more VBS samples of file_written class

WMI query - sample windows WQL with C#, filegroup_id property of file_written

Get a specified instance of file_written 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 file_written 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("filegroup_id : {0}", m["filegroup_id"]);
  
}

WMI query - sample windows WQL with VB.Net, filegroup_id property of file_written

Get a specified instance of file_written 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 file_written 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("filegroup_id : {0}", mObject("filegroup_id"))
Next
comments powered by Disqus
WUtils.com