To Get Failover Cluster Role Infomration from Remote server

Abhishek Reddy 61 Reputation points
2021-11-04T05:52:28.99+00:00

Hi Experts,

Kindly help here :

I am trying to get information from remote server, from Failover cluster I wanted to see Roles in ( failover cluster Manager) using powershell
attcahed is the screen shot which I would want to see via powershell from a local server Status is not getting displayed when used below
Invoke-Command {Get-ClusterResource} -computername SYSXXXXXX.CCCC.local | Select-Object -Property cluster,Name,state,OwnerNode|Where-Object {$_.Name -like "SQL Server*"}| ft -auto , please help
146347-image.png

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,628 questions
0 comments No comments
{count} votes

Accepted answer
  1. Limitless Technology 39,836 Reputation points
    2021-12-21T16:51:07.73+00:00

    Hi @Abhishek Reddy

    Have you tried the Get-ClusterGroup.

    The Get-ClusterGroup cmdlet gets information about one or more clustered roles (resource groups) in a failover cluster.

    A resource group is the unit of failover. During failover, all resources in the resource group move together.

    https://learn.microsoft.com/en-us/powershell/module/failoverclusters/get-clustergroup?view=windowsserver2019-ps

    You can also try to create a failover cluster by fulfilling the prerequisites and then try the above command

    https://learn.microsoft.com/en-us/windows-server/failover-clustering/create-failover-cluster

    --------
    --If the reply is helpful, please Upvote and Accept it as an answer--

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. SChalakov 10,576 Reputation points MVP
    2021-11-04T09:02:07.34+00:00

    Hi,
    can you please post more details abpout the output of:

    Invoke-Command {Get-ClusterResource} -computername SYSXXXXXX.CCCC.local | Select-Object -Property cluster,Name,state,OwnerNode|Where-Object {$_.Name -like "SQL Server*"}| ft -auto , please help  
    

    What does the output look lie, do you see any errors?

    Can you please also try building a crendetial object and using it with the Invoke-Commadn, it could be a credential issue also. You wull find plenty of examples here:

    Invoke-Command
    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/invoke-command?view=powershell-7.1

    Thanks in advance for a couple of more details!

    ----------

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Regards,
    Stoyan

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.