Private/CloudInit/Set-UnattendedCloudInitComputerName.ps1

function Set-UnattendedCloudInitComputerName
{
    param
    (
        [Parameter(Mandatory = $true)]
        [string]
        $ComputerName
    )

    $Script:un.identity.hostname = $ComputerName
}