'Backup-SqlDatabase with specific Windows Authentifiation

I try to use the powershell command Backup-SqlDatabase with a specific windows authentication (not the current)

Backup-SqlDatabase -ServerInstance $instanceName -Database $databaseName -BackupAction Database -Credential $credential -BackupFile $backupFilePath

With -Credential, it only supports SQL authentication

Without it uses the current windows user authentication



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source