I made a Powershell function just now and saved it to a ps1 file. However, when I try to execute it from within powershell, it won\'t run.
I\'ve allready changed to
I could be off base here, but is it that your script is defining a function, rather than executing it? Perhaps you need to "source" the script:
. .\listallpaths.ps1
... so that now your "listallpaths" function is defined.