I’m developing a module for some inhouse processes, and I’ve followed ‘best practices’ etc… I’ve created my .psd1 file (no ps1xml yet)… but then I run get-command -module none of the cmdlets have any version numbers… they all just have 0.0 listed. I’ve been searching around, and I can’t seem to find any information on how to set these?
(example output with changed names)
PS C:\> Get-Command -Module MyModuleName
CommandType Name Version Source
----------- ---- ------- ------
Function Invoke-MyFunction 0.0 MyModuleName
Function Export-MyInformation 0.0 MyModuleName
Function ConvertTo-MyOtherInfoType 0.0 MyModuleName
You need a manifest file for the modules. psd1 the xml file is for formatting.
Version number of this module.
ModuleVersion = ‘1.0’
The best way to learn about a manifest file a drink the Mr. Jones Cool Aid and watch “Don Jones tool making video 1-3” on the powershell.org youtube channel. Plus purchase the book.
I had created the PSD1 file with New-ModuleManifest, but I must have missed the module version number. I will check the videos… Have multiple books of Don’s, took his combined class (completely worth it… best professional class I’ve taken).
I think Mr. Jones goes over the manifest and xml format stuff in video 3. You can also just go to powershellgallery.com and look at someones manifest under “File List”