The structure of a cmdlet in C# is very similar to the advanced functions.
Like you thought, the logic from your process block will go into the process method. The Try/Catch block is there for error handling.
To accept pipeline input, you have to create your parameters. In a cmdlet written in C#, parameters are created as public properties that have the [Parameter()] attribute. Like in advanced functions, there are options for the [Parameter()] attribute. The PowerShell SDK on MSDN that Marco pointed you towards has more details on the various options for the parameter function, so I'm not going to duplicate that here.
Any parameter that can accept values from the pipeline (either by property name or by type of object) can use pipeline input in your process method.
You can also override the BeginProcessing and EndProcessing methods to do any setup or tear down that you may need.
There is a cmdlet lifecycle diagram here ->
http://msdn.microsoft.com/en-us/lib...S.85).aspx that will help show when different parameter types are bound (parameters that are not getting their values from the pipeline, versus those that are), and when each of the methods is called.
If these concepts sound a little odd, you will likely need to brush up on your C# a bit. Writing a basic cmdlet is not that difficult, but writing a cmdlet in a language and process that is unfamiliar is a much more daunting task.
We are more than happy to help you work through the process of creating a cmdlet to suit your needs, but lets focus this discussion on more specific parts of the process.
On a side note, if you just want to compile your cmdlet to protect the script, you could set up your parameters and invoke your script in the cmdlet, passing whatever parameters you need to.
http://msdn.microsoft.com/en-us/lib...S.85).aspx