Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PowerShell Module Manifest FileList property - specifically what does it do?

So I am trying to refine my PowerShell module skills. There is a parameter in the module manifest (.psd1) called 'FileList'. It has the helpful documentation

# List of all files packaged with this module
FileList = @()

So, I have a module that contains a few .psm1 files. Perfect! (I thought). Perhaps I should list these files there?

However, the files I do list in FileList seem to get resolved to full path names when the module is imported, but none of the functions they contain are available?

Does this mean I need to list the .psm1 files in two places?
I had been listing them in NestedModules, which did import the functions, but I'm unsure if this is right?

Does anyone have any insight on specifically what FileList does and does not do, and how it should be used with a PowerShell module?

like image 963
Turtle1363 Avatar asked Oct 16 '25 01:10

Turtle1363


1 Answers

This parameter isn't used at the moment by PowerShell.

From the documentation:

List of all files packaged with this module. As with ModuleList, FileList is to assist you as an inventory list, and is not otherwise processed.

You can give a full list of files included. But you still have to use the NestedModules parameter (depending on the structure of your module), because it has a different purpose.

like image 76
Niels Avatar answered Oct 19 '25 11:10

Niels



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!