Created
          January 11, 2019 10:37 
        
      - 
      
 - 
        
Save NateLehman/4223bbfb9f2b09f5ae642affe7d17181 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | using System.Management.Automation; | |
| namespace MyPSModule | |
| { | |
| [Cmdlet("Get", "Foo")] | |
| public class GetFooCommand : PSCmdlet | |
| { | |
| [Parameter] | |
| public string Name { get; set; } = string.Empty; | |
| protected override void EndProcessing() | |
| { | |
| this.WriteObject("Foo is " + this.Name); | |
| base.EndProcessing(); | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment