Granting Owner Role in PowerShell

To grant the Owner role to the M365 Global Admin account that the Microsoft Entra application uses to log in to Microsoft 365, do the following:

  1. Connect to Exchange Online PowerShell. For more information, see this Microsoft article.
  2. Use the following example to grant the role:

$folders = get-publicfolder "\" -recurse

foreach($folder in $folders)

{

Add-PublicFolderClientPermission -Identity $folder.identity -user <user_account> -AccessRights Owner

}