New-sqmRandomSaPassword
Other sqmSQLTool v1.8.2+
Generates a random, policy-compliant SA password.

Examples

$pwd = New-sqmRandomSaPassword
$pwd = New-sqmRandomSaPassword
    # Gibt SecureString zurueck
$pwd = New-sqmRandomSaPassword -Length 24 -ExportPath 'C:\System\Passwords\sa.txt'
$pwd = New-sqmRandomSaPassword -Length 24 -ExportPath 'C:\System\Passwords\sa.txt'
    # SecureString + DPAPI-Export nach C:\System\Passwords\sa.txt
# Klartext anzeigen (nur fuer Debugging):
# Klartext anzeigen (nur fuer Debugging):
    $pwd = New-sqmRandomSaPassword
    $cred = New-Object PSCredential('sa', $pwd)
    $cred.GetNetworkCredential().Password