Functions/Internal/GetSecret.ps1

function GetSecret{
    param ([securestring] $SecureString)
    $credential = New-Object System.Management.Automation.PSCredential("bob", $SecureString)
    $Credential.GetNetworkCredential().Password
}