BackupSQL

1.1

Performs Full and Log Backup of SQL Server instance databases with SMO in a zip file and sends an email with the result.

Deletes backups older than n days.

For detailed how to use, run: Get-Help BackupSQL.ps1 -Full

Requisites to run backup in a computer without SQL Server installed

1. Navigate to: https://www.microsoft.com/en-US/download/details.aspx?id=55992 and
Performs Full and Log Backup of SQL Server instance databases with SMO in a zip file and sends an email with the result.

Deletes backups older than n days.

For detailed how to use, run: Get-Help BackupSQL.ps1 -Full

Requisites to run backup in a computer without SQL Server installed

1. Navigate to: https://www.microsoft.com/en-US/download/details.aspx?id=55992 and install SQLSysClrTypes.msi

2. Run from PowerShell
   - Register-PackageSource -provider NuGet -name nugetRepository -location https://www.nuget.org/api/v2
   - Install-Package Microsoft.SqlServer.SqlManagementObjects  

3. Run from PowerShell: Install-Module -Name SqlServer

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Script -Name BackupSQL

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Author(s)

Juan Granados

Copyright

2021 Juan Granados

Owners

Tags

SQL Server WID Windows Internal Database backup mail email rotation network share

Functions

Get-Database

Dependencies

This script has no dependencies.

Release Notes

Fix switch parameters

Version History

Version Downloads Last updated
1.1 (current version) 19 9/3/2021
1.0 4 9/2/2021