Forum Discussion

Deleted's avatar
Deleted
Nov 15, 2016

Changing Access Type via PowerShell

I need to change all Public Groups to Provate Groups. So I am attempting to run:

 

Get-UnifiedGroup | Where {$_.AccessType -eq "Public"} | Set-UnifiedGroup -AccessType Private

 

I keep getting this error:

 

A parameter cannot be found that matches parameter name 'AccessType'.

 

Anyone experienced this?

  • Mmm...very weird, I have just pasted your PS code in the PowerShell console and I have not had any error...however I'm seeing a warning seeing that the comand execution finished correctly, but not configuration has been modified for every group on the tenant. If I run the Set-UnifiedGroup "Group Name" -AccessType "Public" it works without problems....and also to add, it's not enougt (I believe) to be Global Administrator to change this setting for each Group. You need to be an Owner in each Group...adding some more folks here TonyRedmond cfiessinger VasilMichev

    • jcgonzalezmartin's avatar
      jcgonzalezmartin
      MVP
      And more funny stuff: PowerShell says that the Group I changed to Public is Public...but the UI says it's Privated (Previous status)...^-^
      • TonyRedmond's avatar
        TonyRedmond
        MVP

        I just tried it here and was able to run Set-UnifiedGroup to set the access type for a group from public to private and vice versa.

    • Deleted's avatar
      Deleted

      When using PowerShell with ISE I don't even get access to tthe -AccessType Paramater to use? I have tested in a demo tenant and seem to have access. But when trying this through a prod tenant even though the account is a global admin -AccessType is not available.

       

      There is another issue in play here in that the organisations email is on premise and NOT in Exchange Online adn there is NO Hybrid set up either. All these groups have created as a result of users accessing Planner and creating Plans.

      • I don't know how you have connected to Exchange Online using PowerShell ISE. It's odd that the -AccessType parameter is unavailable. Is it the same with the normal PowerShell console?

         

        Even though users might use another email system (non-hybrid, outside Office 365) for their day-to-day email, do they have Exchange Online mailboxes? If they are assigned something like an E3 license, they will get an Exchange mailbox automatically... So the mailboxes might be there and are linked to Office 365 accounts but are not being used.

Resources