
How to display function definition / code in powershell
If the function name contains a hyphen (eg. test-computername): ${function:test-Computername} Alternatively: (Get-Command test-Computername).Definition Or cat function:show-list To export function to text file cat function:test-computername >c:\temp\function