Sql-server – Powershell command to backup a SQL Server DB

powershellsql server

Is there a PowerShell command that will execute a backup of all databases on a server?

Alternatively, can I call a stored proc from PowerShell (that will execute the backup)?

Best Answer

if you are running sql server 2008 you have powershell bindings. See this link

SQL Server 2008 powershell has a cmdlet invoke-sqlcmd.