In one of my previous posts, I show you how to use PowerShell to manage your SQL Server database backups and how to install the SQL Server PowerShell module.
To be able to manage SQL Server Database Backups you will need to load Microsoft.SqlServer.SmoExtended assembly.
If not you can end up with the following error.
PS>TerminatingError(New-Object): “Cannot find type [Microsoft.SqlServer.Management.Smo.Backup]: verify that the assembly containing this type is loaded.”
new-object : Cannot find type [Microsoft.SqlServer.Management.Smo.Backup]: verify that the assembly containing this type is loaded.
On the following post, you can read more about how to Backup SQL Server database with the Powershell script, and about some other asemblies you may want to use, such as
As well if you want you can download full Powershell script with use example how to Backup all user databases to Azure Storage.
Download source:
https://gallery.technet.microsoft.com/Use-PowerShell-to-Backup-3bb0a397
Description:
This PowerShell script can be invoked remotely from another PC through the command line, with PowerShell or executed remotely through task scheduler adding parameters – instance name, backup destination path, excluded databases list, Azure storage name, log file path.
Leave a Reply