I'm trying to call another function from another ps1 file but not having any luck. The files are in the same directory. Any hints?
Asked
Active
Viewed 32 times
-2
-
`. .\fxlib2.ps1` for loading the function into your scope – Santiago Squarzon May 20 '22 at 15:15
-
1`. $PSScriptRoot\fxlib2.ps1` :) – Mathias R. Jessen May 20 '22 at 15:15
-
The relative pathing not working for me. Could it be a PowerShell 5.1 thing? The ```$PSScriptRoot``` does work. – Rod May 20 '22 at 15:32
-
1ISE uses a different variable for the script root: https://stackoverflow.com/questions/44474074/powershell-psscriptroot-is-null – CraftyB May 20 '22 at 15:51
-
PSA: In general ISE is deprecated and not receiving new updates. It's recommended to switch to VSCode and its PowerShell extension if you're looking for the successor to ISE. – Bender the Greatest May 25 '22 at 13:27