Author Posts

April 4, 2016 at 1:54 pm

Having created module manifest for module Tools (Tools.psm1 module file, Tools.psd1 manifest file in the same module folder) ten days ago I noticed that functions latter added to module can not be recognized although they are listed with:

Get-Command -Module Tools -Type Function

I have to manually remove (it is normal to do after any change) and import module (this should not have been done – autoloading should have worked) manually each time I change existing or create additional functions in Tools module even though it is located where it should be in order for autoloading to work:

$env:USERPROFILE\Documents\WindowsPowerShell\Modules\Tools\

Also autoloading of functions in other modules located in $env:USERPROFILE\Documents\WindowsPowerShell\Modules\ModuleName does not work. Naming of .psm1 and .psd1 files is correct – same name of file as module folder name. Before creating module manifest for module Tools autoloading worked flawlessly.

April 4, 2016 at 2:18 pm

I have no idea what is going on here. Having deleted Tools.psd1 file autoloading of some modules works and of others does not. This is difficult to troubleshoot.