ManagementObjectSearcher searcher = new ManagementObjectSearcher("select * from win32_share"); foreach (ManagementObject share in searcher.Get()) { Console.WriteLine("=============="); ManagementBaseObject baseObj = share as ManagementBaseObject; PropertyDataCollection.PropertyDataEnumerator en = share.Properties.GetEnumerator(); while (en.MoveNext()) { Console.WriteLine(en.Current.Name + "=" + en.Current.Value); } }