Steps
Start your Windows PowerShell on your computer.
Right click and select Run as administrator option.

Paste the below script on the PowerShell window and click the enter button.

Check your SharePoint site Feature will activate successfully.

Syntax Explanation

Delete-SPGroup "http://gowtham.sharepoint.com/teams/tutorials" "SharePointOwners"

This example deletes SharePoint group "SharePointOwners" at the given site collection
  1. Code:
  2. Function Delete-SPGroup()
  3. {
  4. [CmdletBinding()]
  5. Param(
  6. [Parameter(Mandatory=$true)][string]$SiteURL,
  7. [Parameter(Mandatory=$true)]$GroupName
  8. )
  9. #Get the rootweb
  10. $web = Get-SPWeb $SiteURL
  11. #group already exists
  12. if($Web.SiteGroups[$GroupName] -ne $null)
  13. {
  14. #remove sharepoint group using powershell
  15. $web.SiteGroups.Remove($GroupName)
  16. $web.Update()
  17. Write-Host "Group Deleted!"
  18. }
  19. else
  20. {
  21. Write-Host "Group doesn't Exists!"
  22. }
  23. $web.Dispose()
  24. }
  25. Delete-SPGroup()