Get-Clustergroup help

Hey Guys,

I would like to develop a powershell script which will find the ownernode of HA and reboot the other node. Can you guys help me here.

Listener name:TEST00.example.com
NODE1: TEST01.example.com
Node2: TEST02.example.com
HA name:TESTHA

Get-clustegroup
Name OwnerNode State


TESTHA TEST01 Online
Available Storage TEST02 Offline
Cluster Group TEST02 Online

In the above scenario when I found TEST01 holds the TESTHA I want to reboot TEST02.

Raja,

Welcome to the forum.

That sounds like a nice idea. :wink:

What kind of help do you need? What have you tried so far? Did you try to search for a solution first? You should ask a specific question about a particular piece of code you wrote. At the moment it sounds like you ask us to write something for you. :wink:

To be frank, I am new to powershell but I would like to learn. My current requirement is above which will me to save lot of time.

We all have been there. But we cannot “make you learn”. And you will not learn when we actually write the code for you.

OK. Fair enough. But you still do not ask a specific question. So I will ask again: What have you tried so far? And what exactly do you need help with?