Microsoft SQL 2012 roles - alert when roles move from one node to another with powershell

WW-6729 371 Reputation points
2021-02-08T16:56:43.93+00:00

Hello!

Is it somehow possible to get an alert when roles move from one sql node to another with powershell? I'm trying to do something like this:

Get-ClusterGroup and from that result (Name, OwnerNode, State) get an email alert when one of roles changes OwnerNode?

I'm starter with powershell so bear with me :)

Thank you!

Best regards!

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,137 questions
Windows Server Clustering
Windows Server Clustering
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Clustering: The grouping of multiple servers in a way that allows them to appear to be a single unit to client computers on a network. Clustering is a means of increasing network capacity, providing live backup in case one of the servers fails, and improving data security.
1,016 questions
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,576 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Tom Phillips 17,741 Reputation points
    2021-02-08T17:00:22.48+00:00
    1 person found this answer helpful.
    0 comments No comments

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.