Skip to content

Commit

Permalink
1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Jun 24, 2019
1 parent 153e9d8 commit 8d6be29
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
14 changes: 12 additions & 2 deletions allcommands.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,20 @@ function Add-DbaAgDatabase {

foreach ($secondaryInstance in $secondaryInstances) {

$agreplica = Get-DbaAgReplica -SqlInstance $Primary -SqlCredential $SqlCredential -AvailabilityGroup $ag.name -Replica $secondaryInstance.NetName
try {
$secondaryInstanceReplicaName = $secondaryInstance.NetName
} catch {
$secondaryInstanceReplicaName = $secondaryInstance.ComputerName
}

if ($secondaryInstance.InstanceName) {
$secondaryInstanceReplicaName = $secondaryInstanceReplicaName, $secondaryInstance.InstanceName -join "\"
}

$agreplica = Get-DbaAgReplica -SqlInstance $Primary -SqlCredential $SqlCredential -AvailabilityGroup $ag.name -Replica $secondaryInstanceReplicaName

if (-not $agreplica) {
Stop-Function -Continue -Message "Could not connect to instance $($secondaryInstance.Name)"
Stop-Function -Continue -Message "Secondary replica $($secondaryInstanceReplicaName) for availability group $($ag.name) not found on $($Primary.Name)"
}

if ($SeedingMode -eq "Automatic" -and $secondaryInstance.VersionMajor -le 12) {
Expand Down
2 changes: 1 addition & 1 deletion bin/dbatools-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -31894,7 +31894,7 @@
"CommandName": "New-DbaEndpoint",
"Availability": "Windows, Linux, macOS",
"Links": "https://dbatools.io/New-DbaEndpoint",
"Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaEndpoint -SqlInstance localhost\nCreates all Endpoint(s) on the local default SQL Server instance\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaEndpoint -SqlInstance localhost, sql2016\nReturns all Endpoint(s) for the local and sql2016 SQL Server instances",
"Examples": "-------------------------- EXAMPLE 1 --------------------------\nPS C:\\\u003eNew-DbaEndpoint -SqlInstance localhost\\sql2017 -Type DatabaseMirroring\nCreates a database mirroring endpoint on localhost\\sql2017 which using the default port\n-------------------------- EXAMPLE 2 --------------------------\nPS C:\\\u003eNew-DbaEndpoint -SqlInstance localhost\\sql2017 -Type DatabaseMirroring -Port 5055\nCreates a database mirroring endpoint on localhost\\sql2017 which uses alternative port 5055",
"Params": [
[
"SqlInstance",
Expand Down
2 changes: 1 addition & 1 deletion dbatools.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
RootModule = 'dbatools.psm1'

# Version number of this module.
ModuleVersion = '1.0.4'
ModuleVersion = '1.0.5'

# ID used to uniquely identify this module
GUID = '9d139310-ce45-41ce-8e8b-d76335aa1789'
Expand Down
Loading

0 comments on commit 8d6be29

Please sign in to comment.