Scaffold/functions/FunctionExample.ps1

function Get-ExampleData {
    param (
        [string]$YourName=("Bob","Charlie","Susan","Karen" | Get-Random)
    )

    $Data = 1..10 | ForEach-Object {
        [pscustomobject]@{
            Title = $_
            Value = (Get-Random)
        }
    }

    [PSCustomObject]@{
        Name = $YourName
        Greeting = "Hello, World!"
        Data = $Data
    }
}