If I create a new module and copy it to the PSAppDeployToolkit.Extensions folder.
Like: $PSSCriptfolder\PSAppDeployToolkit.Extensions\aNewModule.psm1 (include aNewModule.psd1)
then this module is not loaded automatically.
Because of code in Invoke-AppDeplyToolkit.ps1
If I rename my Module to PSAppDeployToolkit.aNewModule.psm1 the Modul will also not load automaticly but If i change the code and Add the Folder “PSAppDeployToolkit.Extensions” to the Get-Item then will load the new Module automaticly in the Initialization phase
Yes, because you shouldn’t be doing it like that. A new module should be in its own folder. If its name has m starts with the PSAppDeployToolkit. namespace, it’ll auto-import.
Please also make the new module using the New-Module cmdlet, don’t make it by hand. A module is more than a .psm1 file, it should have an associated .psd1 file alongside it.
Can I read this anywhere?
I mean I read the reference and I can not fine like how to add a own module ( of course the psm1 and psd1 files)
I just read at the deployment strukture:
├───PSAppDeployToolkit.Extensions # PSADT Extensions module files. # TODO - write more on this
│ PSAppDeployToolkit.Extensions.psd1
│ PSAppDeployToolkit.Extensions.psm1
I think I just use the choice 1 until I get new information about customising the toolkit with module.
I just used PSAppDeployToolkit.Extensions as an example.
You have to edit the psd1 file and match it contents with what you are calling your extension.
You have to change the GUID inside the PSD1. (they need to be unique across all PowerShell modules.)
Sorry my fault. I just succeeded tested it. Well i just want to know where can i read this in the documents like the reference. And of course everybody can check the code to find out the answer.