Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Last active December 25, 2015 15:08
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 guitarrapc/fdf9ad919bef1960e264 to your computer and use it in GitHub Desktop.
Save guitarrapc/fdf9ad919bef1960e264 to your computer and use it in GitHub Desktop.
using System.Management.Automation;
namespace TestModule
{
[CmdletBinding()]
[Cmdlet(VerbsCommon.Get, "Hoge")]
public class GetHoge : PSCmdlet
{
[Parameter(Mandatory = false, Position = 0, ValueFromPipeline = true)]
public string Name { get; set; } = "Hoge";
protected override void ProcessRecord() => this.WriteObject(this.Name);
}
}
@guitarrapc
Copy link
Author

animation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment