In PowerShell, how do I define a function in a file and call it from the PowerShell commandline? I have a .ps1 file in which I want to define custom functions. Imagine the file is called MyFunctions.ps1, and the content is as follows: Write-Host "Installing functions" function... May 18, 2022 0 Comments