Powershell script to replace usergroup in SPO

Welcome Forums General PowerShell Q&A Powershell script to replace usergroup in SPO

Viewing 1 reply thread
  • Author
    Posts
    • #275241
      Participant
      Topics: 1
      Replies: 0
      Points: 12
      Rank: Member

      Hi,

      I’m new here so sorry if I posted this wrong or maybe for the 100th time.

      The usergroup “Visitors” in SPO contain a modified AAD group named “AllusersexceptABmembers”, is there a way to use a script or command within PowerShell to replace this group with the group “AllenabledAzureUsers”. If not I have to manually replace this within around 700 SPO sites.

      Thnx.

    • #275373
      Participant
      Topics: 17
      Replies: 1951
      Points: 3,986
      Helping Hand
      Rank: Community Hero

      Have you done any research? There are many factors such as SharePoint versions. A quick search ‘powershell sharepoint group members update’ you can get plenty of links to review such as:

      https://docs.microsoft.com/en-us/microsoft-365/enterprise/manage-sharepoint-users-and-groups-with-powershell?view=o365-worldwide

      Replace would basically be a Remove of the old group and Add of the new group.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.