Dannly
Dannly2mo ago

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!
4 Replies
rubenf
rubenf2mo ago
We did a lot of engineering for Python that we didn't for Powershell so it's expected that it doesn't work
Dannly
Dannly2mo ago
thank you for the response! would you know any way around this?
rubenf
rubenf2mo ago
Unfortunately not
Dannly
Dannly2mo ago
I see! tysm for your time :)