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.
12,693 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.
957 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,362 questions
{count} votes