Home:ALL Converter>Permanently add PowerShell module? (Import-Module)

Permanently add PowerShell module? (Import-Module)

Ask Time:2019-01-14T06:44:23         Author:vskbdvds

Json Formatter

I'm using a third-party module I found on GitHub and importing it with:

powershell Import-Module .\foo.ps1

This imports successfully and the module works great. But when I open a new PowerShell terminal, it doesn't load the module, I have to run the Import-Module command everytime. Is it possible to have modules load permanently?

I'm using Windows 10 with PowerShell v3.

Author:vskbdvds,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54173906/permanently-add-powershell-module-import-module
Keith Nicholas :

You can add it to one of your profiles that powershell loads by default. Best bet is \n\n%UserProfile%\\My Documents\\WindowsPowerShell\\Microsoft.PowerShell_profile.ps1 \n\n\nor\n\n%UserProfile%\\My Documents\\WindowsPowerShell\\profile.ps1\n\nsee https://learn.microsoft.com/en-us/previous-versions//bb613488(v=vs.85) for the full list",
2019-01-13T23:00:04
yy