This repository serves as a template for creating new PowerShell modules.
- Rename
.\Source\Module.psd1
and.\Source\Module.psm1
to the proper name of the module which should be the name of the repository. - Edit the following
<ModuleName>.psd1
properties:- RootModule
- Update to
<ModuleName>.psm1
- Update to
- GUID
- Generate and insert a new GUID with
New-GUID
- Generate and insert a new GUID with
- ProjectUri
- HelpInfoURI
- RootModule
- Update the path in
build.psd1
with the new name of your module.
If you want to build this PowerShell module, follow these steps:
-
Install ModuleBuilder by running the following command in your PowerShell console:
Install-Module ModuleBuilder
-
Open a PowerShell console and navigate to the root directory of this repository.
-
Run the following command to generate the module manifest and build the module:
Build-Module -UnversionedOutputDirectory
-
ModuleBuilder will analyze your module's code and generate the necessary files, including the module manifest (
<ModuleName>.psd1
) and the module script (<ModuleName>.psm1
). -
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.