I am using Visual Studio 2010 Ultimate Beta 2. What is the relevant namespace/classes for creating a PowerShell cmdlet in C#?
I assume there is an interface or abstract class to derive from.
You'll need to derive from System.Management.Automation.Cmdlet.
It lives in system.management.automation.dll. If you're on Windows Vista or newer, the file's in your GAC, which can be referenced but it's tricky. It's probably easiest to install the PowerShell SDK, and then you can reference the assembly directly from "Add Reference..." in Visual Studio. (Full path is C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0.)