• λ我爱Aspx >> Asp.Net >> WMI使用技巧集
  • WMI使用技巧集

  • :未知  Դ:internet  :2007-5-20 16:40:28  ؼ:
  • break;

    }

    }

    static void ReportIP()

    {

    Console.WriteLine( "****** Current IP addresses:" );

    ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");

    ManagementObjectCollection moc = mc.GetInstances();

    foreach( ManagementObject mo in moc )

    {

    if( ! (bool) mo[ "IPEnabled" ] )

    continue;

    Console.WriteLine( "{0}\n SVC: '{1}' MAC: [{2}]", (string) mo["Caption"],

    (string) mo["ServiceName"], (string) mo["MACAddress"] );

    string[] addresses = (string[]) mo[ "IPAddress" ];

    string[] subnets = (string[]) mo[ "IPSubnet" ];

    Console.WriteLine( " Addresses :" );

    foreach(string sad in addresses)

    Console.WriteLine( "\t'{0}'", sad );

    Ҷƪл˵?
  • һƪweb组件的通信---浅谈事件
    һƪ利用SQLDMO备份还原SQL SERVER