How to dotsource custom ps1 in v4

Hello. In my v3 scripts, near the beginning of the Deploy-Application.ps1, I dotsource a ps1 file from the SupportFiles folder. This file has some common functions that we use in our instal and uninstall sections of PSADT. At the risk of embarrassing myself again, I can’t seem to figure how to do this with v4. I think that the ps1 file is being loaded okay but none of the functions are available in the un/install functions.

I’ll continue to stumble around as I’ve not tried everything yet but, in the meantime, I thought I’d ask if someone can point me in the right direction?

I know I should probably create a module but would rather the quick and dirty solution now while I work on a module (or perhaps extension) in future.

Thanks.

Hi,

In v3 you would normally add any custom functions you create yourself to the file AppDeployToolkitExtensions.ps1 which is created for just this purpose.

In v4 you add your custom functions to the file PSAppDeployToolkit.Extensions.psm1.

Thanks @JFP! :grinning: I figured I was missing something fundamental. Custom functions are working now that I’ve put them in the extensions psm1.