Welcome Forums General PowerShell Q&A Persistently loaded libraries

This topic contains 1 reply, has 1 voice, and was last updated by

Participant
4 years, 7 months ago.

• Author
Posts
• #14115

Participant
Points: 0
Rank: Member

Hi All,
I've got a few libraries that I use frequently in PowerShell, which I call/load/import using the;

Though I have to make that call each time I start PowerShell. It's not the end of the world, but *surely* there's a way I can configure PowerShell to load these dlls on startup? I have tried putting them into a file created to match the $profile variable, but I'm not convinced this$profile is being used (as even a simple set-location command doesn't seem to take effect). Calling the profile as a script, however, does work.

• #14116

Participant
Points: 0
Rank: Member

Hi All,
I solved this myself. I didn't realise the PowerShell ISE and PowerShell console used different profiles, so had created a \$profile in ISE which was ineffectual in PowerShell. Adding my LoadFile calls to the correct profile had the desired results.

Cheers,

D

The topic ‘Persistently loaded libraries’ is closed to new replies.