using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Smo.Wmi;
namespace MgComputer
{
    class Program
    {
        static void Main(string[] args)
        {
            ManagedComputer mc = new ManagedComputer();
            Console.WriteLine(mc.Name);
            foreach (Service s in mc.Services)
            {
                Console.WriteLine(s.Name);
            }
            Server server = new Server();
            foreach (Database d in server.Databases)
            {
                Console.WriteLine(d.Name);
            }
        }

    }
}
