Hi Vijay,
Welcome to Q&A Forum; this is a great place to get support, answers, and tips.
Thank you for posting your question; I'll be more than glad to help you out.
The folder in the Failover cluster manager is named "Roles," but in PowerShell (due to historical topics), it is still called "groups," so those two commands Cosmog told you above are correct.
Just a snippet as an example from one of my scripts:
Import-Module FailoverClusters
Add-Content -Path $LogFileName -Value "Date: $date1" -Encoding ASCII
Add-Content -Path $LogFileName -Value "Executed By: $admin" -Encoding ASCII
Get-ClusterGroup | Where-Object {$_.Name -like '*SQL*'} | Out-File -append -Encoding ASCII -FilePath $LogFileName
$clustergroups = Get-ClusterGroup | Where-Object {$_.IsCoreGroup -eq $false}
[...]
$cg | Move-ClusterGroup -Node $PreferredOwner
I hope my answer is helpful to you,
Your
Bjoern Peters
If the reply was helpful, please upvote and/or accept it as an answer, as this helps others in the community with similar questions. Thanks!