0

I use this command:

Set-SPOSiteGroup -Site htt.....com -Identity newgroup -Owner newgroup2

(newgroup is a Sharepoint group, newgroup2 is another sharepoint group)

Powershell responds with this: Set-SPOSiteGroup: The user newgroup2 was not found.

What is wrong with my command? I am sure newgroup2 exists, and i am able to make it the owner of newgroup using the sharepoint interface.

2 Answers 2

1

You can try with the following powershell code to set the group owner,

Add-PSSnapin Microsoft.Sharepoint.Powershell

#Get the SPWeb
$web = Get-SPWeb http://url_to_web

#Get the Group
$group1 = $web.SiteGroups["newgroup"]

#Get the Group 
$group2 = $web.SiteGroups["newgroup2"]

#Assign Group as the owner
$group1.Owner = $group2

#Update the Group
$group1.Update()

Remove-PsSnapin Microsoft.SharePoint.PowerShell

Hope this helps you.

1

It's not possible to set an AD-group as an owner, but you can set a SharePoint group as owner as a workaround.

Steps

  1. Create a new SharePoint group, add the Security group as a member.
  2. Set the newly created SharePoint group as the owner of your existing SharePoint group

Reference: Set group owner using powershell

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.