Skip to content

how to determine cluster node ? #8

@chipitsine

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.

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