I'm writing a powershell script to run some sql backups to a network share. Is there a way to get around the password prompt?
Backup-SqlDatabase -ServerInstance $SQLServer -Database $DatabaseName -BackupFile "\\network-share\MainDB.bak" -Credential (Get-Credential "sa")
Currently this prompts me for a password. I'd like for these to run automatically without any user intervention.