What's the purpose of "Documents\PowerShell\Scripts" folder?

There is a folder in:



I recall I’ve read somewhere this location is used as default to install scripts, same thing as PSModulePath but for scripts.

I’m having really hard time to figure out which environment variable is used to update this folder?

$env:Path += some_location, should work but I have some feeling this default location is to be used somehow else.


Anyway if I put some scripts into this location it’s not picked up by new session, so my real question here is what’s the purpose of this folder?

The path with just PowerShell is for powershell core. The scripts folder is where scripts are installed when using Install-Script

The path for Windows Powershell scripts is \user\documents\WindowsPowershell\Scripts

I see, but why isn’t this location in session’s path by default if it’s used as default location to install scripts?

Modules when installed are put into module path, what’s wrong with scripts then?