Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.39 KB

README.md

File metadata and controls

34 lines (26 loc) · 1.39 KB

Repo Template

This repository serves as a template for creating new PowerShell modules.

Getting Started

  1. Rename .\Source\Module.psd1 and .\Source\Module.psm1 to the proper name of the module which should be the name of the repository.
  2. Edit the following <ModuleName>.psd1 properties:
    • RootModule
      • Update to <ModuleName>.psm1
    • GUID
      • Generate and insert a new GUID with New-GUID
    • ProjectUri
    • HelpInfoURI
  3. Update the path in build.psd1 with the new name of your module.

Building with ModuleBuilder

If you want to build this PowerShell module, follow these steps:

  1. Install ModuleBuilder by running the following command in your PowerShell console:

    Install-Module ModuleBuilder
  2. Open a PowerShell console and navigate to the root directory of this repository.

  3. Run the following command to generate the module manifest and build the module:

    Build-Module -UnversionedOutputDirectory
  4. ModuleBuilder will analyze your module's code and generate the necessary files, including the module manifest (<ModuleName>.psd1) and the module script (<ModuleName>.psm1).

  5. Once the build process is complete, you can find the built module in the Output directory.

For more information on how to use ModuleBuilder, please refer to the ModuleBuilder documentation.