Skip to content

fvilers/AsyncPowerShell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AsyncPowerShell

A simple commandlet that allows usage of async methods

Installation

To install AsyncPowerShell, run the following command in the Package Manager Console

PM> Install-Package AsyncPowerShell

Usage

Create a new commandlet that inherits from AsyncPowerShell.AsyncPSCmdlet. Overrides the ProcessRecordAsync method and implement your commandlet the way you like it!

[Cmdlet(VerbsCommon.Get, "Something")]
public class GetSomethingCommand : AsyncPSCmdlet
{
    protected async override Task ProcessRecordAsync()
    {
        using (var client = new HttpClient())
        {
            var html = await client.GetStringAsync("https://github.com/fvilers/AsyncPowerShell");
			WriteObject(html);
        }
    }
}

Release notes

  • Version 1.0: AsyncPSCmdlet released

About the author

Fabian Vilers
Twitter: @fvilers

About

A simple commandlet that allows usage of async methods

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published