Modify PowerShell profile to add custom PSModulePath


If you need to add a custom path to your PSModulePath environment variable, you can do like that :

Add-Content -LiteralPath $profile -Value $herestring

That can be helpful if you store your custom modules on OneDrive, GoogleDrive or Dropbox.
This technique can also be used with a file share, for corporate module repository.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.