I've stored commonly used powershell scripts at
%USERPROFILE%\Bin. I created a
USER_BIN environment variable which I added to the user
PATH environment variable via
Control Panel > System and Security > System > Advanced system setting > Environment Variables.
When I enter the name of a script stored in
my-script.ps1, into a cmd or powershell prompt I get the message
my-script.ps1 : The term 'my-script.ps1' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
If I provide the full-path, i.e.
C:\Users\Ari\Bin\my-script.ps1 the script works fine.