Skip to content

Instantly share code, notes, and snippets.

@tjrobinson
Created July 4, 2012 09:31
Show Gist options
  • Save tjrobinson/3046352 to your computer and use it in GitHub Desktop.
Save tjrobinson/3046352 to your computer and use it in GitHub Desktop.
PowerShell CmdLet in C#
using System.Management.Automation;
[Cmdlet(VerbsCommon.Get, "HelloWorld")]
public class GetHelloWorld : Cmdlet
{
protected override void ProcessRecord()
{
base.ProcessRecord();
WriteObject("HelloWorld");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment