Skip to content

Instantly share code, notes, and snippets.

@tjrobinson
Created July 4, 2012 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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