private/write/Write-InstanceCredential.ps1

function Write-InstanceCredential
{
    [CmdletBinding(PositionalBinding = $true)]
    param(
        [Parameter(Mandatory = $true)]
        [string] $InstanceId
    )

    $password = Get-InstancePassword -InstanceId $InstanceId

    if (-not $password) { return }

    Write-Host ''
    Write-Host '-------------- EC2 Instance Username --------------'
    Write-Host '.\Administrator'
    Write-Host '-------------- EC2 Instance Password --------------'
    Write-Host "$password"
    Write-Host '---------------------------------------------------'
    Write-Host ''
}