Set anonymous link access level for SharePoint Online tenant using Powershell
After you have enabled anonymous links for SharePoint Online tenant, you can set what access level the links can give: edit or only view. The setting is global for the entire tenant. You can choose between Edit, View and None.