function New-ModuleTemplate {
    Generate module scaffolding and boilerplate.

    Creates the following:

    - Public, Private & Classes directories for storing module functions.

    - A psm1 script that dot sources functions from Public & Private, but exports
      only those in Public.

    - A manifest file.

    - Two scripts in the root of the module that are dot sourced in the .psm1
      file. One defines color splatting hash tables, the other provides support
      for storing sensitive data in variables in a Config.psd1 file that is
      ignored by git.

    .PARAMETER Names
    The names of the modules you want to create.

    The path to store these modules in. Defaults to the last path found in

    .PARAMETER Author
    Name of the modules author. This will be inserted into the Author and
    Copyright fields in the manifest file. Defaults to the current users' name.

    .PARAMETER CompanyName
    This will be inserted into the Company field of the manifest file. Defaults
    to nil.

    .PARAMETER Description
    Description of the module. This will be inserted into the description field
    of the module manifest and at the top of the main

    .PARAMETER RequiredModules
    List of modules that this module depends on. Will be inserted into the
    RequiredModules field of the manifest file.

    .PARAMETER UncommentConfig
    A switch that uncomments a line in the psm1 file that dot sources the
    configuration management script. This is stored in Config.ps1 and allows
    reading in of sensitive data stored in a Config.psd1 for setting variables
    available in the modules' scope.

    $Params = @{
    Name = Module1,Module2,Module3
    Path = "C:\MyModules"
    Author = "Me Myself & I"
    CompanyName = "My Awesome Company"
    Description = "This module will rock your world!"
    RequiredModules = 'All','My','Other','Modules'
    New-ModuleTemplate @Params

    Param (
    [System.IO.FileInfo]$Path=($env:PSModulePath -split ':|;' | Select-Object -last 1),
    [string]$Description="Module Description",

    begin {
    $Templates = "$PSScriptRoot\..\Templates"
    $Module    = "$Templates\Module.psm1"
    $Config       = "$Templates\Config.ps1"
    $Colors       = "$Templates\Colors.ps1"
    $GitIgnore = "$Templates\GitIgnore"

    process {
    foreach ($Name in $Names) {
        $Directories = @(
        foreach ($Directory in $Directories) {
        New-Path "$Path\$Name\$Directory" -Type 'Directory'
        Set-Content -Value "# $Name $Directory Functions" -Path "$Path\$Name\$Directory\"
        Write-Verbose "Generated $Path\$Name\$Directory."

        Set-Content -Value "# $Name Powershell Module" -Path "$Path\$Name\"
        Add-Content -Value "`n*$Description*`n" -Path "$Path\$Name\"

        Copy-Item $Config "$Path\$Name\Config.ps1"
        Write-Verbose "Copied $Config to $Path\$Name\Config.ps1."

        if ($UncommentConfig) {
        (Get-Content $Module) -Replace ('\#\.\s','. ') |
          Set-Content "$Path\$Name\$Name.psm1"
        } else {
        Copy-Item $Module "$Path\$Name\$Name.psm1"
        Write-Verbose "Copied $Module to $Path\$Name\$Name.psm1."

        Copy-Item $Colors "$Path\$Name\Colors.ps1"
        Write-Verbose "Copied $Colors to $Path\$Name\Colors.ps1."

        $Params = @{
        Path = "$Path\$Name\$Name.psd1"
        RootModule = $Name
        Author = $Author
        Copyright = "(c) $(Get-Date -Uformat %Y) $Author. All rights reserved."
        CompanyName = $CompanyName
        Description = $Description
        RequiredModules = $RequiredModules
        FunctionsToExport = '*'
        AliasesToExport = '*'
        VariablesToExport = '*'
        CmdletsToExport = '*'
        New-ModuleManifest @Params
        Write-Verbose "Generated $Module manifest at $Path\$Name\$Name.psd1."

        Copy-Item $GitIgnore "$Path\$Name\.gitignore"
        Write-Verbose "Copied $GitIgnore to $Path\$Name\.gitignore."