Forum Discussion
Chip Cooper
Mar 25, 2020Copper Contributor
Set-PnPGroup : Group cannot be found
Goal is to create a site collection level SharePoint group with 'Read' permissions, and apply this group to each sub-site. This group should contain several members. My code is failing on: Set-PnPG...
- Mar 27, 2020
Chip Cooper Hello.
As you got the object saved to $OwnersGroup Var$OwnersGroup = Get-PnPGroup -AssociatedOwnerGroup
When you set the Owner you have to select the specific attribute that represents the Identity or any unique value inside $OwnersGroup variable.
Set-PnPGroup -Identity $glbMGRConts -Owner $OwnersGroup.Title #Or any other unique identity attribute
Regards
Erick Moreno
Erick A. Moreno R.
Mar 27, 2020Iron Contributor
Chip Cooper Hello.
As you got the object saved to $OwnersGroup Var
$OwnersGroup = Get-PnPGroup -AssociatedOwnerGroup
When you set the Owner you have to select the specific attribute that represents the Identity or any unique value inside $OwnersGroup variable.
Set-PnPGroup -Identity $glbMGRConts -Owner $OwnersGroup.Title #Or any other unique identity attribute
Regards
Erick Moreno