Guest User

Untitled

a guest
Jan 11th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. using System.Management.Automation;
  2.  
  3. namespace MyPSModule
  4. {
  5. [Cmdlet("Get", "Foo")]
  6. public class GetFooCommand : PSCmdlet
  7. {
  8. [Parameter]
  9. public string Name { get; set; } = string.Empty;
  10.  
  11. protected override void EndProcessing()
  12. {
  13. this.WriteObject("Foo is " + this.Name);
  14. base.EndProcessing();
  15. }
  16. }
  17. }
Add Comment
Please, Sign In to add comment