<# assign a credential to variable named $sqlCred #>
$sqlCred = Get-Credential someUsername
<# use cred $sqlCred by default when calling functions with
specific names( *-Dba* )
and three named parameters:
-SqlCredential
-SourceSqlCredential
-DestinationSqlCredential
#>
$PSDefaultParameterValues['*-Dba*:SqlCredential'] = $sqlCred
$PSDefaultParameterValues['*-Dba*:SourceSqlCredential'] = $sqlCred
$PSDefaultParameterValues['*-Dba*:DestinationSqlCredential'] = $sqlCred
#Ideas mostly stolen from https://dbatools.io/defaults/