This code snippet demonstrates how you can list all publishing points on a WMS 9.5 instance using C#.

// ------------------------
// This requires the following using statement
// Note that this is not present by default in Visual Studio, you require either an installed WMS Server on the
// local machine or copy and reference the Microsoft.WindowsMediaServices.dll file from either the Windows SDK or a WMS Server
using Microsoft.WindowsMediaServices.Interop;
// ------------------------

// This lists all publishing points present on the local Windows Media Services 9.5 instance
// (WMS in Windows 2008), this will probably work on older WMS Servers as well.
// Example output is :
 /*
 * C:\stuff>ListPublishingPoints.exe
 * we have : test
 * we have : HereBeDragons
 * we have : RadioStation
 * we have : TvStation
 */

try
{
  // we begin by connecting to the local instance
  WMSServer Server = new WMSServerClass();

  // Loop through every Publishing Point present
  foreach (IWMSPublishingPoint PublishingPoint in Server.PublishingPoints)
  {
    // Windows 2008 Media Services can have 2 built in publishing points for handling Cache/Proxy,
    //these points are of no concern to me so I exclude them in the listing
    // If you want to work with them you can simply remove this if statement.
    if (PublishingPoint.Name != "Cache/Proxy On-Demand" && PublishingPoint.Name != "Cache/Proxy Broadcast")
    {
      // Do what you want with them.
      Console.WriteLine("we have : {0}", PublishingPoint.Name);
    }
  }
}
catch (Exception e)
{
  // Error handling goes here.
  Console.WriteLine("Error :\n{0}", e.ToString());
}