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
    • #275241
      Topics: 1
      Replies: 0
      Points: 12
      Rank: Member


      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.


    • #275373
      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:


      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.