1

Lest say I have three classes names Dog, Cat and Tree in matching files Dog_file.psm1,Cat_file.psm1 and Tree_file.psm1. I need to create one Powershell module with these three files. while I'm reading trough https://msdn.microsoft.com/en-us/library/dd878337(v=vs.85).aspx I feel it can be achieve.

By reading various post and articles I think NestedModules property in the .psd1 is the way. But not sure exactly how would be the folder structure that files need to place and syntax of the .psd1 file. So far couldn't find any sample

Someone done this before? I'm using Powershell 5

Nayana Adassuriya
  • 23,596
  • 30
  • 104
  • 147
  • 1
    You can place the *.psm1 files side-by-side with the *.psd1 file in a folder of the same name as the module name – Mathias R. Jessen Apr 22 '17 at 14:17
  • @Mathias R. Jessen: Any idea about the *.psd1 syntax? – Nayana Adassuriya Apr 22 '17 at 14:23
  • 5
    Detailed in the article you linked. Easiest way to get started is by using `New-ModuleManifest`. I would also recommend [this post](http://ramblingcookiemonster.github.io/Building-A-PowerShell-Module/) – Mathias R. Jessen Apr 22 '17 at 14:28
  • 1
    Since Warren Frame's material was posted, I'd also recommend his content that he just provided at the PowerShell summit that [he posted on github](https://github.com/RamblingCookieMonster/WritingModules). – BenH Apr 22 '17 at 15:06

0 Answers0