Skip to content

how to determine cluster node ? #8

Description

@chipitsine

hello,

I've writter simple script

cls

. "C:\xxx\Get-SQLInstance.ps1"

'running on: {0}' -f  $env:Computername
'---------------'

Get-SQLInstance -Computername $env:Computername | % {
    $_.ComputerName
}

I expected it to show cluster node (an owner of cluster application). However, it shows current computer all the time:

running on: SRV-SQL01-DCA
---------------
SRV-SQL01-DCA
SRV-SQL01-DCA
SRV-SQL01-DCA
SRV-SQL01-DCA
SRV-SQL01-DCA
SRV-SQL01-DCA
SRV-SQL01-DCA
SRV-SQL01-DCA
SRV-SQL01-DCA
SRV-SQL01-DCA
SRV-SQL01-DCA

PS C:\Windows\system32> 

actually, I checked, cluster instances are distributed across several nodes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions