• alen teplitsky - Wednesday, January 3, 2018 11:37 AM

    Not too experienced with powershell functions, but how do you run it outside of the ISE? I created the function, but can't run it from a regular powershell window with just the function name

    Save the function as a ps1 file and put that file in your Powershell profile, save it in a module and import the module, paste the function in the beginning of whatever powershell script you are running which is similar to using the .source method which is just referencing the ps1 file with the function in a script before it is called - along the lines of
    .  C:\SomePath\ToPSFile\whatever.ps1
    This article has a good explanation and examples of using the different approaches:
    How To Make Use Of Functions in PowerShell

    Sue