NewModuleTemplate Icon

NEWMODULETEMPLATE

The Modern Standard for PowerShell Module Scaffolding

Build production‑ready PowerShell modules in seconds. NewModuleTemplate delivers a complete, opinionated, best‑practice foundation — tests, docs, analyzer rules, strict mode, Git initialization, and more — all generated automatically.

View on PowerShell Gallery

WHY NEWMODULETEMPLATE?

PowerShell modules deserve more than a folder and a manifest. This is the professional, modern, batteries‑included foundation for real‑world module development.

Opinionated Structure

Every module starts with a clean, modern layout that follows industry best practices.

Strict Mode + Analyzer

Consistency and quality from day one — no more mismatched coding standards.

Documentation Ready

PlatyPS integration gives you Markdown help files with a single command.

FEATURES

Full or Minimal Scaffolding

Choose between a complete production‑ready module or a lightweight minimal template.

🧩

Switch‑Controlled Components

Disable tests, docs, analyzer rules, scripts, or Git initialization with simple switches.

🔧

Git Initialization

Automatic repo creation, .gitignore, .gitattributes, and line‑ending normalization.

🧪

Pester Testing

Ready‑to‑run test suite included. Just write your tests and run Invoke-Pester.

📚

PlatyPS Documentation

Generate clean, versioned Markdown help files instantly.

🛡️

Analyzer Rules

Static analysis and strict mode ensure your module stays clean and consistent.

NEWMODULETEMPLATE VS PLASTER

Plaster is a flexible templating engine. NewModuleTemplate is a modern, opinionated, production‑ready scaffolder.

Plaster

Template‑driven, flexible, but generic.

Great for custom templates, but offers no guidance on modern module structure.

NewModuleTemplate

The modern standard for PowerShell modules.

Strict mode, analyzer rules, Git initialization, tests, docs, build scripts — all included.

MODES OVERVIEW

NewModuleTemplate provides two modes — Full and Minimal — plus fine‑grained switches that let you tailor the scaffold to your exact needs.

🚀

Full Mode (Default)

Generates a complete, production‑ready module structure including:

  • Public/Private folders
  • Pester tests
  • PlatyPS docs
  • PSScriptAnalyzer rules
  • Build & publish scripts
  • Git initialization

-Minimal Mode

Generates only the essentials:

  • Public/Private folders
  • Module manifest
  • Module loader
  • README + CHANGELOG

No tests, no docs, no analyzer, no scripts, no Git.

🎛️

Switch‑Controlled Components

Full Mode can selectively disable components:

  • -NoTests
  • -NoDocs
  • -NoAnalyzer
  • -NoScripts
  • -NoGit

Build exactly the module you want — no clutter.

📦

Example Output

New-ModuleTemplate -Path "C:\Projects" -Name "MyModule"

MyModule/
  MyModule.psm1
  MyModule.psd1
  Public/
  Private/
  Tests/
  Docs/
  Scripts/
  Analyzer/
  README.md
  CHANGELOG.md
  .gitignore
  .gitattributes
        

Build & Publish Automation

NewModuleTemplate includes ready-to-run build and publish scripts that streamline your release workflow. Generate documentation, run tests, validate analyzer rules, and publish to the PowerShell Gallery with confidence.

GET STARTED

Install NewModuleTemplate from the PowerShell Gallery.

Install Now