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
Show more

Installation Options

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

Install-Script -Name BackupSQL

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

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

Owners

Copyright

2021 Juan Granados

Package Details

Author(s)

  • Juan Granados

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

FileList

Version History

Version Downloads Last updated
1.1 (current version) 124 9/3/2021
1.0 23 9/2/2021