DannlyD
Windmill2y ago
8 replies
Dannly

Sourcing PowerShell scripts from other PowerShell scripts

There's a PowerShell script A, created using Windmill's web IDE, and another PowerShell script B, both in the same folder. There are some functions defined in A that I wish to use in B. However, I can't seem to properly source them (PowerShell can't find the module file). I've tried Import-Module ./A.ps1, Import-Module /f/folder/A, ./A.ps1, Import-Module /f/folder/A.ps1, to no avail. Using a similar notation in Python, however, seems to work perfectly fine, suggesting that it's some issue particular to PowerShell. Any ideas?
Thank you in advance!
Was this page helpful?