Hello Team,
How do I get the list of all the domains allowed for external sharing for SharePoint online site collection using powershell? I'm doing something like below but It's not working. Please help. Thanks.
$Sites = Get-SPOSite -Limit AllForeach($site in $sites)
{
if ($site.Template -ne "GROUP#0" -AND $site.SharingCapability -ne "Disabled")
{
Write-host "++++++++++++++++++++"
Write-host $site.Url
Write-host $site.SharingAllowedDomainList
}
}