SHARE
TWEET

Untitled

a guest Jan 11th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top