DS_cn - property in ROOT\directory\LDAP namespace

DS_cn in other namespaces

List of classes with DS_cn local property in ROOT\directory\LDAP namespace

propertyClassOrigin
DS_cnds_topds_top

List of classes with DS_cn derived property in ROOT\directory\LDAP namespace

propertyClassOrigin
DS_cnads_accountds_top
DS_cnads_acspolicyds_top
DS_cnads_acsresourcelimitsds_top
DS_cnads_acssubnetds_top
DS_cnads_addressbookcontainerds_top
DS_cnads_addresstemplateds_top
DS_cnads_applicationentityds_top
DS_cnads_applicationprocessds_top
DS_cnads_applicationversionds_top
DS_cnads_attributeschemads_top
DS_cnads_builtindomainds_top
DS_cnads_categoryregistrationds_top
DS_cnads_certificationauthorityds_top
DS_cnads_classregistrationds_top
DS_cnads_classschemads_top
DS_cnads_classstoreds_top
DS_cnads_comconnectionpointds_top
DS_cnads_computerds_top
DS_cnads_configurationds_top
DS_cnads_contactds_top
DS_cnads_containerds_top
DS_cnads_controlaccessrightds_top
DS_cnads_countryds_top
DS_cnads_crldistributionpointds_top
DS_cnads_crossrefds_top
DS_cnads_crossrefcontainerds_top
DS_cnads_deviceds_top
DS_cnads_dfsconfigurationds_top
DS_cnads_dhcpclassds_top
DS_cnads_displayspecifierds_top
DS_cnads_displaytemplateds_top
DS_cnads_dmdds_top
DS_cnads_dnsnodeds_top
DS_cnads_dnszoneds_top
DS_cnads_documentds_top
DS_cnads_documentseriesds_top
DS_cnads_domaindnsds_top
DS_cnads_domainpolicyds_top
DS_cnads_dsads_top
DS_cnads_dsuisettingsds_top
DS_cnads_filelinktrackingds_top
DS_cnads_filelinktrackingentryds_top
DS_cnads_foreignsecurityprincipalds_top
DS_cnads_friendlycountryds_top
DS_cnads_ftdfsds_top
DS_cnads_groupds_top
DS_cnads_groupofnamesds_top
DS_cnads_groupofuniquenamesds_top
DS_cnads_grouppolicycontainerds_top
DS_cnads_indexservercatalogds_top
DS_cnads_inetorgpersonds_top
DS_cnads_infrastructureupdateds_top
DS_cnads_intellimirrorgroupds_top
DS_cnads_intellimirrorscpds_top
DS_cnads_intersitetransportds_top
DS_cnads_intersitetransportcontainerds_top
DS_cnads_ipnetworkds_top
DS_cnads_ipprotocolds_top
DS_cnads_ipsecfilterds_top
DS_cnads_ipsecisakmppolicyds_top
DS_cnads_ipsecnegotiationpolicyds_top
DS_cnads_ipsecnfads_top
DS_cnads_ipsecpolicyds_top
DS_cnads_ipserviceds_top
DS_cnads_licensingsitesettingsds_top
DS_cnads_linktrackobjectmovetableds_top
DS_cnads_linktrackomtentryds_top
DS_cnads_linktrackvolentryds_top
DS_cnads_linktrackvolumetableds_top
DS_cnads_localityds_top
DS_cnads_lostandfoundds_top
DS_cnads_meetingds_top
DS_cnads_ms_net_ieee_80211_grouppolicyds_top
DS_cnads_ms_net_ieee_8023_grouppolicyds_top
DS_cnads_ms_sql_olapcubeds_top
DS_cnads_ms_sql_olapdatabaseds_top
DS_cnads_ms_sql_olapserverds_top
DS_cnads_ms_sql_sqldatabaseds_top
DS_cnads_ms_sql_sqlpublicationds_top
DS_cnads_ms_sql_sqlrepositoryds_top
DS_cnads_ms_sql_sqlserverds_top
DS_cnads_msauthz_centralaccesspoliciesds_top
DS_cnads_msauthz_centralaccesspolicyds_top
DS_cnads_msauthz_centralaccessruleds_top
DS_cnads_msauthz_centralaccessrulesds_top
DS_cnads_mscom_partitionds_top
DS_cnads_mscom_partitionsetds_top
DS_cnads_msdfs_deletedlinkv2ds_top
DS_cnads_msdfs_linkv2ds_top
DS_cnads_msdfs_namespaceanchords_top
DS_cnads_msdfs_namespacev2ds_top
DS_cnads_msdfsr_connectionds_top
DS_cnads_msdfsr_contentds_top
DS_cnads_msdfsr_contentsetds_top
DS_cnads_msdfsr_globalsettingsds_top
DS_cnads_msdfsr_localsettingsds_top
DS_cnads_msdfsr_memberds_top
DS_cnads_msdfsr_replicationgroupds_top
DS_cnads_msdfsr_subscriberds_top
DS_cnads_msdfsr_subscriptionds_top
DS_cnads_msdfsr_topologyds_top
DS_cnads_msdns_serversettingsds_top
DS_cnads_msds_app_configurationds_top
DS_cnads_msds_appdatads_top
DS_cnads_msds_authnpoliciesds_top
DS_cnads_msds_authnpolicyds_top
DS_cnads_msds_authnpolicysilods_top
DS_cnads_msds_authnpolicysilosds_top
DS_cnads_msds_azadminmanagerds_top
DS_cnads_msds_azapplicationds_top
DS_cnads_msds_azoperationds_top
DS_cnads_msds_azroleds_top
DS_cnads_msds_azscopeds_top
DS_cnads_msds_aztaskds_top
DS_cnads_msds_claimstransformationpoliciesds_top
DS_cnads_msds_claimstransformationpolicytypeds_top
DS_cnads_msds_claimtypeds_top
DS_cnads_msds_claimtypesds_top
DS_cnads_msds_deviceds_top
DS_cnads_msds_devicecontainerds_top
DS_cnads_msds_deviceregistrationserviceds_top
DS_cnads_msds_deviceregistrationservicecontainerds_top
DS_cnads_msds_groupmanagedserviceaccountds_top
DS_cnads_msds_managedserviceaccountds_top
DS_cnads_msds_optionalfeatureds_top
DS_cnads_msds_passwordsettingsds_top
DS_cnads_msds_passwordsettingscontainerds_top
DS_cnads_msds_quotacontainerds_top
DS_cnads_msds_quotacontrolds_top
DS_cnads_msds_resourcepropertiesds_top
DS_cnads_msds_resourcepropertyds_top
DS_cnads_msds_resourcepropertylistds_top
DS_cnads_msds_valuetypeds_top
DS_cnads_msexchconfigurationcontainerds_top
DS_cnads_msfve_recoveryinformationds_top
DS_cnads_msieee80211_policyds_top
DS_cnads_msimaging_postscanprocessds_top
DS_cnads_msimaging_pspsds_top
DS_cnads_mskds_provrootkeyds_top
DS_cnads_mskds_provserverconfigurationds_top
DS_cnads_msmq_custom_recipientds_top
DS_cnads_msmq_groupds_top
DS_cnads_msmqconfigurationds_top
DS_cnads_msmqenterprisesettingsds_top
DS_cnads_msmqmigrateduserds_top
DS_cnads_msmqqueueds_top
DS_cnads_msmqsettingsds_top
DS_cnads_msmqsitelinkds_top
DS_cnads_mspki_enterprise_oidds_top
DS_cnads_mspki_key_recovery_agentds_top
DS_cnads_mspki_privatekeyrecoveryagentds_top
DS_cnads_msprint_connectionpolicyds_top
DS_cnads_mssfu30domaininfods_top
DS_cnads_mssfu30mailaliasesds_top
DS_cnads_mssfu30netidds_top
DS_cnads_mssfu30networkuserds_top
DS_cnads_mssfu30nismapconfigds_top
DS_cnads_msspp_activationobjectds_top
DS_cnads_msspp_activationobjectscontainerds_top
DS_cnads_mstapi_rtconferenceds_top
DS_cnads_mstapi_rtpersonds_top
DS_cnads_mstpm_informationobjectds_top
DS_cnads_mstpm_informationobjectscontainerds_top
DS_cnads_mswmi_intrangeparamds_top
DS_cnads_mswmi_intsetparamds_top
DS_cnads_mswmi_mergeablepolicytemplateds_top
DS_cnads_mswmi_objectencodingds_top
DS_cnads_mswmi_policytemplateds_top
DS_cnads_mswmi_policytypeds_top
DS_cnads_mswmi_rangeparamds_top
DS_cnads_mswmi_realrangeparamds_top
DS_cnads_mswmi_ruleds_top
DS_cnads_mswmi_shadowobjectds_top
DS_cnads_mswmi_simplepolicytemplateds_top
DS_cnads_mswmi_somds_top
DS_cnads_mswmi_stringsetparamds_top
DS_cnads_mswmi_uintrangeparamds_top
DS_cnads_mswmi_uintsetparamds_top
DS_cnads_mswmi_unknownrangeparamds_top
DS_cnads_mswmi_wmigpods_top
DS_cnads_nismapds_top
DS_cnads_nisnetgroupds_top
DS_cnads_nisobjectds_top
DS_cnads_ntdsconnectionds_top
DS_cnads_ntdsdsads_top
DS_cnads_ntdsdsarods_top
DS_cnads_ntdsserviceds_top
DS_cnads_ntdssitesettingsds_top
DS_cnads_ntfrsmemberds_top
DS_cnads_ntfrsreplicasetds_top
DS_cnads_ntfrssettingsds_top
DS_cnads_ntfrssubscriberds_top
DS_cnads_ntfrssubscriptionsds_top
DS_cnads_oncrpcds_top
DS_cnads_organizationds_top
DS_cnads_organizationalpersonds_top
DS_cnads_organizationalroleds_top
DS_cnads_organizationalunitds_top
DS_cnads_packageregistrationds_top
DS_cnads_personds_top
DS_cnads_physicallocationds_top
DS_cnads_pkicertificatetemplateds_top
DS_cnads_pkienrollmentserviceds_top
DS_cnads_printqueueds_top
DS_cnads_querypolicyds_top
DS_cnads_remotemailrecipientds_top
DS_cnads_remotestorageservicepointds_top
DS_cnads_residentialpersonds_top
DS_cnads_rfc822localpartds_top
DS_cnads_ridmanagerds_top
DS_cnads_ridsetds_top
DS_cnads_roomds_top
DS_cnads_rpccontainerds_top
DS_cnads_rpcgroupds_top
DS_cnads_rpcprofileds_top
DS_cnads_rpcprofileelementds_top
DS_cnads_rpcserverds_top
DS_cnads_rpcserverelementds_top
DS_cnads_rrasadministrationconnectionpointds_top
DS_cnads_rrasadministrationdictionaryds_top
DS_cnads_samserverds_top
DS_cnads_secretds_top
DS_cnads_serverds_top
DS_cnads_serverscontainerds_top
DS_cnads_serviceadministrationpointds_top
DS_cnads_serviceclassds_top
DS_cnads_serviceconnectionpointds_top
DS_cnads_serviceinstanceds_top
DS_cnads_siteds_top
DS_cnads_sitelinkds_top
DS_cnads_sitelinkbridgeds_top
DS_cnads_sitescontainerds_top
DS_cnads_storageds_top
DS_cnads_subnetds_top
DS_cnads_subnetcontainerds_top
DS_cnads_subschemads_top
DS_cnads_trusteddomainds_top
DS_cnads_typelibraryds_top
DS_cnads_userds_top
DS_cnads_volumeds_top
DS_cnds_accountds_top
DS_cnds_acspolicyds_top
DS_cnds_acsresourcelimitsds_top
DS_cnds_acssubnetds_top
DS_cnds_addressbookcontainerds_top
DS_cnds_addresstemplateds_top
DS_cnds_applicationentityds_top
DS_cnds_applicationprocessds_top
DS_cnds_applicationsettingsds_top
DS_cnds_applicationsitesettingsds_top
DS_cnds_applicationversionds_top
DS_cnds_attributeschemads_top
DS_cnds_bootabledeviceds_top
DS_cnds_builtindomainds_top
DS_cnds_categoryregistrationds_top
DS_cnds_certificationauthorityds_top
DS_cnds_classregistrationds_top
DS_cnds_classschemads_top
DS_cnds_classstoreds_top
DS_cnds_comconnectionpointds_top
DS_cnds_computerds_top
DS_cnds_configurationds_top
DS_cnds_connectionpointds_top
DS_cnds_contactds_top
DS_cnds_containerds_top
DS_cnds_controlaccessrightds_top
DS_cnds_countryds_top
DS_cnds_crldistributionpointds_top
DS_cnds_crossrefds_top
DS_cnds_crossrefcontainerds_top
DS_cnds_deviceds_top
DS_cnds_dfsconfigurationds_top
DS_cnds_dhcpclassds_top
DS_cnds_displayspecifierds_top
DS_cnds_displaytemplateds_top
DS_cnds_dmdds_top
DS_cnds_dnsnodeds_top
DS_cnds_dnszoneds_top
DS_cnds_documentds_top
DS_cnds_documentseriesds_top
DS_cnds_domainds_top
DS_cnds_domaindnsds_top
DS_cnds_domainpolicyds_top
DS_cnds_domainrelatedobjectds_top
DS_cnds_dsads_top
DS_cnds_dsuisettingsds_top
DS_cnds_dynamicobjectds_top
DS_cnds_filelinktrackingds_top
DS_cnds_filelinktrackingentryds_top
DS_cnds_foreignsecurityprincipalds_top
DS_cnds_friendlycountryds_top
DS_cnds_ftdfsds_top
DS_cnds_groupds_top
DS_cnds_groupofnamesds_top
DS_cnds_groupofuniquenamesds_top
DS_cnds_grouppolicycontainerds_top
DS_cnds_ieee802deviceds_top
DS_cnds_indexservercatalogds_top
DS_cnds_inetorgpersonds_top
DS_cnds_infrastructureupdateds_top
DS_cnds_intellimirrorgroupds_top
DS_cnds_intellimirrorscpds_top
DS_cnds_intersitetransportds_top
DS_cnds_intersitetransportcontainerds_top
DS_cnds_iphostds_top
DS_cnds_ipnetworkds_top
DS_cnds_ipprotocolds_top
DS_cnds_ipsecbaseds_top
DS_cnds_ipsecfilterds_top
DS_cnds_ipsecisakmppolicyds_top
DS_cnds_ipsecnegotiationpolicyds_top
DS_cnds_ipsecnfads_top
DS_cnds_ipsecpolicyds_top
DS_cnds_ipserviceds_top
DS_cnds_leafds_top
DS_cnds_licensingsitesettingsds_top
DS_cnds_linktrackobjectmovetableds_top
DS_cnds_linktrackomtentryds_top
DS_cnds_linktrackvolentryds_top
DS_cnds_linktrackvolumetableds_top
DS_cnds_localityds_top
DS_cnds_lostandfoundds_top
DS_cnds_mailrecipientds_top
DS_cnds_meetingds_top
DS_cnds_ms_net_ieee_80211_grouppolicyds_top
DS_cnds_ms_net_ieee_8023_grouppolicyds_top
DS_cnds_ms_sql_olapcubeds_top
DS_cnds_ms_sql_olapdatabaseds_top
DS_cnds_ms_sql_olapserverds_top
DS_cnds_ms_sql_sqldatabaseds_top
DS_cnds_ms_sql_sqlpublicationds_top
DS_cnds_ms_sql_sqlrepositoryds_top
DS_cnds_ms_sql_sqlserverds_top
DS_cnds_msauthz_centralaccesspoliciesds_top
DS_cnds_msauthz_centralaccesspolicyds_top
DS_cnds_msauthz_centralaccessruleds_top
DS_cnds_msauthz_centralaccessrulesds_top
DS_cnds_mscom_partitionds_top
DS_cnds_mscom_partitionsetds_top
DS_cnds_msdfs_deletedlinkv2ds_top
DS_cnds_msdfs_linkv2ds_top
DS_cnds_msdfs_namespaceanchords_top
DS_cnds_msdfs_namespacev2ds_top
DS_cnds_msdfsr_connectionds_top
DS_cnds_msdfsr_contentds_top
DS_cnds_msdfsr_contentsetds_top
DS_cnds_msdfsr_globalsettingsds_top
DS_cnds_msdfsr_localsettingsds_top
DS_cnds_msdfsr_memberds_top
DS_cnds_msdfsr_replicationgroupds_top
DS_cnds_msdfsr_subscriberds_top
DS_cnds_msdfsr_subscriptionds_top
DS_cnds_msdfsr_topologyds_top
DS_cnds_msdns_serversettingsds_top
DS_cnds_msds_app_configurationds_top
DS_cnds_msds_appdatads_top
DS_cnds_msds_authnpoliciesds_top
DS_cnds_msds_authnpolicyds_top
DS_cnds_msds_authnpolicysilods_top
DS_cnds_msds_authnpolicysilosds_top
DS_cnds_msds_azadminmanagerds_top
DS_cnds_msds_azapplicationds_top
DS_cnds_msds_azoperationds_top
DS_cnds_msds_azroleds_top
DS_cnds_msds_azscopeds_top
DS_cnds_msds_aztaskds_top
DS_cnds_msds_claimstransformationpoliciesds_top
DS_cnds_msds_claimstransformationpolicytypeds_top
DS_cnds_msds_claimtypeds_top
DS_cnds_msds_claimtypepropertybaseds_top
DS_cnds_msds_claimtypesds_top
DS_cnds_msds_cloudextensionsds_top
DS_cnds_msds_deviceds_top
DS_cnds_msds_devicecontainerds_top
DS_cnds_msds_deviceregistrationserviceds_top
DS_cnds_msds_deviceregistrationservicecontainerds_top
DS_cnds_msds_groupmanagedserviceaccountds_top
DS_cnds_msds_managedserviceaccountds_top
DS_cnds_msds_optionalfeatureds_top
DS_cnds_msds_passwordsettingsds_top
DS_cnds_msds_passwordsettingscontainerds_top
DS_cnds_msds_quotacontainerds_top
DS_cnds_msds_quotacontrolds_top
DS_cnds_msds_resourcepropertiesds_top
DS_cnds_msds_resourcepropertyds_top
DS_cnds_msds_resourcepropertylistds_top
DS_cnds_msds_valuetypeds_top
DS_cnds_msexchconfigurationcontainerds_top
DS_cnds_msfve_recoveryinformationds_top
DS_cnds_msieee80211_policyds_top
DS_cnds_msimaging_postscanprocessds_top
DS_cnds_msimaging_pspsds_top
DS_cnds_mskds_provrootkeyds_top
DS_cnds_mskds_provserverconfigurationds_top
DS_cnds_msmq_custom_recipientds_top
DS_cnds_msmq_groupds_top
DS_cnds_msmqconfigurationds_top
DS_cnds_msmqenterprisesettingsds_top
DS_cnds_msmqmigrateduserds_top
DS_cnds_msmqqueueds_top
DS_cnds_msmqsettingsds_top
DS_cnds_msmqsitelinkds_top
DS_cnds_mspki_enterprise_oidds_top
DS_cnds_mspki_key_recovery_agentds_top
DS_cnds_mspki_privatekeyrecoveryagentds_top
DS_cnds_msprint_connectionpolicyds_top
DS_cnds_mssfu30domaininfods_top
DS_cnds_mssfu30mailaliasesds_top
DS_cnds_mssfu30netidds_top
DS_cnds_mssfu30networkuserds_top
DS_cnds_mssfu30nismapconfigds_top
DS_cnds_msspp_activationobjectds_top
DS_cnds_msspp_activationobjectscontainerds_top
DS_cnds_mstapi_rtconferenceds_top
DS_cnds_mstapi_rtpersonds_top
DS_cnds_mstpm_informationobjectds_top
DS_cnds_mstpm_informationobjectscontainerds_top
DS_cnds_mswmi_intrangeparamds_top
DS_cnds_mswmi_intsetparamds_top
DS_cnds_mswmi_mergeablepolicytemplateds_top
DS_cnds_mswmi_objectencodingds_top
DS_cnds_mswmi_policytemplateds_top
DS_cnds_mswmi_policytypeds_top
DS_cnds_mswmi_rangeparamds_top
DS_cnds_mswmi_realrangeparamds_top
DS_cnds_mswmi_ruleds_top
DS_cnds_mswmi_shadowobjectds_top
DS_cnds_mswmi_simplepolicytemplateds_top
DS_cnds_mswmi_somds_top
DS_cnds_mswmi_stringsetparamds_top
DS_cnds_mswmi_uintrangeparamds_top
DS_cnds_mswmi_uintsetparamds_top
DS_cnds_mswmi_unknownrangeparamds_top
DS_cnds_mswmi_wmigpods_top
DS_cnds_nismapds_top
DS_cnds_nisnetgroupds_top
DS_cnds_nisobjectds_top
DS_cnds_ntdsconnectionds_top
DS_cnds_ntdsdsads_top
DS_cnds_ntdsdsarods_top
DS_cnds_ntdsserviceds_top
DS_cnds_ntdssitesettingsds_top
DS_cnds_ntfrsmemberds_top
DS_cnds_ntfrsreplicasetds_top
DS_cnds_ntfrssettingsds_top
DS_cnds_ntfrssubscriberds_top
DS_cnds_ntfrssubscriptionsds_top
DS_cnds_oncrpcds_top
DS_cnds_organizationds_top
DS_cnds_organizationalpersonds_top
DS_cnds_organizationalroleds_top
DS_cnds_organizationalunitds_top
DS_cnds_packageregistrationds_top
DS_cnds_personds_top
DS_cnds_physicallocationds_top
DS_cnds_pkicertificatetemplateds_top
DS_cnds_pkienrollmentserviceds_top
DS_cnds_posixaccountds_top
DS_cnds_posixgroupds_top
DS_cnds_printqueueds_top
DS_cnds_querypolicyds_top
DS_cnds_remotemailrecipientds_top
DS_cnds_remotestorageservicepointds_top
DS_cnds_residentialpersonds_top
DS_cnds_rfc822localpartds_top
DS_cnds_ridmanagerds_top
DS_cnds_ridsetds_top
DS_cnds_roomds_top
DS_cnds_rpccontainerds_top
DS_cnds_rpcentryds_top
DS_cnds_rpcgroupds_top
DS_cnds_rpcprofileds_top
DS_cnds_rpcprofileelementds_top
DS_cnds_rpcserverds_top
DS_cnds_rpcserverelementds_top
DS_cnds_rrasadministrationconnectionpointds_top
DS_cnds_rrasadministrationdictionaryds_top
DS_cnds_samdomainds_top
DS_cnds_samdomainbaseds_top
DS_cnds_samserverds_top
DS_cnds_secretds_top
DS_cnds_securityobjectds_top
DS_cnds_securityprincipalds_top
DS_cnds_serverds_top
DS_cnds_serverscontainerds_top
DS_cnds_serviceadministrationpointds_top
DS_cnds_serviceclassds_top
DS_cnds_serviceconnectionpointds_top
DS_cnds_serviceinstanceds_top
DS_cnds_shadowaccountds_top
DS_cnds_simplesecurityobjectds_top
DS_cnds_siteds_top
DS_cnds_sitelinkds_top
DS_cnds_sitelinkbridgeds_top
DS_cnds_sitescontainerds_top
DS_cnds_storageds_top
DS_cnds_subnetds_top
DS_cnds_subnetcontainerds_top
DS_cnds_subschemads_top
DS_cnds_trusteddomainds_top
DS_cnds_typelibraryds_top
DS_cnds_userds_top
DS_cnds_volumeds_top

Code samples for DS_cn property

Get instance of WMI class using GetObject, DS_cn property of ds_container

Short VBS code - get a single specified instance of ds_container 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\directory\LDAP:" + _
 "ds_container.ADSIPath=""LDAP://CN=Users,DC=rootdomain,DC=com""")
Wscript.Echo wmiObject.DS_cn 'or other property name, see properties
See more VBS samples of ds_container class

WMI query - sample windows WQL with C#, DS_cn property of ds_container

Get a specified instance of ds_container 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\\directory\\LDAP");

//create object query
ObjectQuery query = new ObjectQuery("SELECT * FROM ds_container Where ADSIPath=\"LDAP://CN=Users,DC=rootdomain,DC=com\"");

//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("DS_cn : {0}", m["DS_cn"]);
  
}

WMI query - sample windows WQL with VB.Net, DS_cn property of ds_container

Get a specified instance of ds_container 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\directory\LDAP")

'Get a result of WML query 
Dim Query As New ObjectQuery("SELECT * FROM ds_container Where ADSIPath="LDAP://CN=Users,DC=rootdomain,DC=com"")

'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("DS_cn : {0}", mObject("DS_cn"))
Next
comments powered by Disqus
WUtils.com