PowerShell module layout

To get a clear picture on how the build process works it is good to know where you need to store what files.

This blog is part of a series of blog about “Creating PowerShell modules with Azure DevOps.

The following file structure is been generated by the Plaster script:

TheAzureCloudNinjaModule\.gitignore	
TheAzureCloudNinjaModule\.vscode	
TheAzureCloudNinjaModule\.vscode\launch.json	
TheAzureCloudNinjaModule\.vscode\PSScriptAnalyzerSettings.psd1	
TheAzureCloudNinjaModule\.vscode\settings.json	
TheAzureCloudNinjaModule\azure-pipelines.yml	
TheAzureCloudNinjaModule\docs	
TheAzureCloudNinjaModule\docs\about.md	
TheAzureCloudNinjaModule\docs\acknowledgements.md	
TheAzureCloudNinjaModule\docs\index.md	
TheAzureCloudNinjaModule\docs\Quick-Start-Installation-and-Example.md	
TheAzureCloudNinjaModule\LICENSE	
TheAzureCloudNinjaModule\Module.build.ps1	
TheAzureCloudNinjaModule\Module.depend.psd1	
TheAzureCloudNinjaModule\README.md	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\classes	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\data	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\private	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\public	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\public\Import-TheAzureCloudNinja.ps1	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\TheAzureCloudNinjaModule.nuspec	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\TheAzureCloudNinjaModule.psd1	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\TheAzureCloudNinjaModule.psm1	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\TheAzureCloudNinjaModule.PSSATests.ps1	
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\TheAzureCloudNinjaModule.Tests.ps1	

The following two directories are the most commen places where you need to add files:

TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\private
TheAzureCloudNinjaModule\TheAzureCloudNinjaModule\public


TheAzureCloudNinjaModule\ TheAzureCloudNinjaModule\ private

Within this directory you need to store all functions that are going to be used within the PowerShell module. These functions will not be exposed for the end user to use.

The easiest way to look at this directory is that all function here are not going to be stored in the module manifest (FunctionsToExport).

TheAzureCloudNinjaModule\ TheAzureCloudNinjaModule\ public

Within this directory you need to store all functions that are going to be used by the end user. These functions will be exposed for the end user to use.

The easiest way to look at this directory is that all function here are going to be stored in the module manifest (FunctionsToExport).

Author: Eelco Labordus

I am an experienced Azure Cloud Architect with a proven track record in the information technology and services industry. With a deep passion for teaching, I thrive in collaborative team environments where I can contribute to the growth and success of my colleagues. My expertise lies in Azure Cloud, Data Center platforms, Automation, PowerShell, Windows Azure Pack, Azure(stack), System Center, VMware Infrastructure, Scrum, Management, and Process Management. I am a strong information technology professional, holding a degree from Hogeschool Novi.

Leave a Reply

Your email address will not be published. Required fields are marked *