Forum Discussion

Chip Cooper's avatar
Chip Cooper
Copper Contributor
Mar 25, 2020
Solved

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...
  • Erick A. Moreno R.'s avatar
    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 

Resources