Auto load custom function

Tagged: ,

This topic contains 2 replies, has 3 voices, and was last updated by Profile photo of js js 2 weeks, 3 days ago.

  • Author
    Posts
  • #74656
    Profile photo of TommyQuality
    TommyQuality
    Participant

    Hi,

    I have created a custom function that i would like to load each time i start my ISE, do i have to convert to a module to do this or can it load the function without me having to execute it?

    Thanks

  • #74659
    Profile photo of Simon B
    Simon B
    Participant
  • #74693
    Profile photo of js
    js
    Participant

    Sometimes I put them in a file called "$env:userprofile\Documents\WindowsPowerShell\Modules\mymod\mymod.psm1". Then I set a variable called $psmodulepath to "$env:userprofile\Documents\WindowsPowerShell\Modules\mymod" so I can cd to it easily.

You must be logged in to reply to this topic.