Skip to content

[Bug] Get-DBAAvailabilityGroup IsPrimary returns false when a port number is passed in under $SQLInstance #5435

Closed
@GeorgePalacios

Description

  • Running latest release of dbatools
  • Verified errors are not related to permissions
  • Is this bug with Copy-DbaDatabase? You can replicate it using Backup-DbaDatabase ... | Restore-DbaDatabase ...

Environmental data

### PowerShell version:

Name                           Value                                                                                                                                                                     
----                           -----                                                                                                                                                                     
PSVersion                      5.1.17134.590                                                                                                                                                             
PSEdition                      Desktop                                                                                                                                                                   
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                   
BuildVersion                   10.0.17134.590                                                                                                                                                            
CLRVersion                     4.0.30319.42000                                                                                                                                                           
WSManStackVersion              3.0                                                                                                                                                                       
PSRemotingProtocolVersion      2.3                                                                                                                                                                       
SerializationVersion           1.1.0.1                                                                                                                                                                   




### dbatools Module version:


Name    : dbatools
Path    : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.815\dbatools.psd1
Version : 0.9.815

SQL Server:

/* Microsoft SQL Server 2014 (SP2-CU9) (KB4055557) - 12.0.5563.0 (X64)   Dec  7 2017 01:00:06   Copyright (c) Microsoft Corporation  Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor) */

Errors Received

No errors recieved

Steps to Reproduce

<#
    Get-DBAAvailabilityGroup -IsPrimary -SQLInstance "SERVERNAME,1234"
#>

Expected Behavior

Actual Behavior

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions