Skip to content

Plaster template for accelerated PowerShell module development

License

Notifications You must be signed in to change notification settings

poshsecurity/PlasterTemplate-PSModule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1ff0e41 · Oct 28, 2018

History

78 Commits
May 13, 2018
Oct 26, 2017
May 13, 2018
Oct 11, 2017
Oct 11, 2017
Mar 15, 2018
Sep 27, 2018
Oct 26, 2017
Oct 11, 2017
Mar 15, 2018
Dec 21, 2017

Repository files navigation

Using this Plaster Template

The contents of this GitHub repostiory form a PowerShell Plaster template.

This template was created by Kieran Jacobsen, based upon the work of Rob Sewell.

The goal of this template is to provide a strong structure for PowerShell module development and to encourage community participation via GitHub.

Installing Plaster

You can install Plaster from the PowerShell Gallery

PS> Install-Module -Name Plaster

Clone the template

Using Git you can clone the template locally.

PS> git clone https://github.com/poshsecurity/PlasterTemplate

Creating a new module

Now that you have template locally, you can run Invoke-Plaster to create a new module based upon the template.

I typically follow this workflow:

  1. Create a public (or private) on GitHub
  2. Clone the repository locally
    PS> git clone <Path to repository>
  3. Create a hash table containing the required parameters, and then call Invoke-Plaster
    PS> $PlasterParameters = @{
        TemplatePath      = "<path to the Plaster Template above>"
        DestinationPath   = "<path to the new repository you cloned>"
        AuthorName        = "Cool PowerShell Developer"
        AuthorEmail       = "Developer@PowerShellis.Cool"
        ModuleName        = "MyNewModule"
        ModuleDescription = "This is my awesome PowerShell Module!"
        ModuleVersion     = "0.1"
        ModuleFolders     = @("functions", "internal")
        GitHub            = "Yes"
        License           = "Yes"
    }
    
    PS> Invoke-Plaster @PlasterParameters
  4. Plaster should then execute, creating the required files and folders.
  5. When you are ready you can push everything up to GitHub.