PowerShell Live - being retired

Please go to http://www.shelltools.net for more information

Welcome to PowerShell Live - being retired Sign in | Join | Help
Home Main Site Blogs Forums Videos Chat Customer Support

Re: call function from another file

  •  07-30-2007, 7:54 AM

    Re: call function from another file

    As long as the function has been previously defined and is in the same scope, you can easily do this. I'd recommend simply putting all the functions you want to use in your PowerShell profile. This way they will always be available. A variation, which is probably even a better approach, is to put all your functions in a single script, then dot source that script from within your profile script.  This keeps your profile simple yet you still get all the functions loaded.

    Jeffery Hicks
    Microsoft PowerShell MVP
    SAPIEN Technologies - Scripting, Simplified. www.SAPIEN.com

    blog: http://blog.SAPIEN.com
    Filed under: ,
View Complete Thread