I have a situation where I need to have external sharing enabled on SharePoint online tenant level but not on all the sites that get created. Currently all the sites that gets created has external sharing enabled by default. I only need certain site to have that ability. I cannot manually check all the newly created sites everyday.
2.You could use PowerShell to restrict sharing settings on individual SharePoint sites.
#Set Admin Center URL $AdminCenterURL = "https://crescent-admin.sharepoint.com/" $SiteURL="https://crescent.sharepoint.com/sites/operations" #Connect to SharePoint Online Connect-SPOService -url $AdminCenterURL -Credential (Get-Credential) #Disable external sharing Set-SPOSite $SiteURL -SharingCapability "Disabled"