How to display the result of a function?

I know how to invoke a function, but how do I display the function result on screen?

Whatever the function writes to the pipeline, by using Write-Output, will be returned as the result of the function. If nothing else is capturing that result, then it will display on the screen.

Functions are a kind of PowerShell command, and can work very similarly to a cmdlet. So basically, you just run the function.

function test {
  write-output "Hello"