Skip to content

Commit

Permalink
Add-AgDatabase, shorter Example (#9298)
Browse files Browse the repository at this point in the history
  • Loading branch information
niphlod authored Mar 30, 2024
1 parent 3e122d2 commit 26363ec
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion public/Add-DbaAgDatabase.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,19 @@ function Add-DbaAgDatabase {
Adds SharePoint databases as found in SharePoint_Config_2019 on sqlcluster to ag1 on sqlcluster
.EXAMPLE
PS C:\> Add-DbaAgDatabase -SqlInstance sql2017a -AvailabilityGroup ag1 -Database db1 -Secondary sql2017b -SeedingMode Manual -SharedPath \\FS\Backup -AdvancedBackupParams @{ CompressBackup = $true ; FileCount = 3 }
PS C:\> $adv_param = @{
>> CompressBackup = $true
>> FileCount = 3
>> }
PS C:\> $splat = @{
>> SqlInstance = 'sql2017a'
>> AvailabilityGroup = 'ag1'
>> Database = 'db1'
>> Secondary = 'sql2017b'
>> SeedingMode = 'Manual'
>> SharedPath = '\\FS\Backup'
>> }
PS C:\> Add-DbaAgDatabase @splat -AdvancedBackupParams $adv_param
Adds db1 to ag1 on sql2017a and sql2017b. Uses compression and three files while taking the backups.
#>
Expand Down

0 comments on commit 26363ec

Please sign in to comment.