Use Backup-SqlDatabase cmdlet with SQL Server Authentication

Viewed 21907

Is there a way to call Backup-SqlDatabase cmdlet but have it connect to SQL Server 2012 with SQL Server credentials?

The command I am currently using is:

Backup-SqlDatabase -ServerInstance $serverName -Database $sqldbname -BackupFile "$($backupFolder)$($dbname)_db_$($addinionToName).bak"

But this relies on the user, under which it is being call, and by default, Windows Authentication is being used.

2 Answers
Related