Add domains to the existing Allowed Domains
First, a List is created and domains are added to it, then use the Add method in the AllowedDomainsAsAList parameter to add the domains to the existing allowed domains list. When this command completes, the domains in the list will be added to any domains already on the AllowedDomains list.
$list = New-Object Collections.Generic.List[String]
$list.add("abc.com")
$list.add("xyz.com")
Set-CsTenantFederationConfiguration -AllowedDomainsAsAList @{Add=$list}
Validate if it is added
(Get-CsTenantFederationConfiguration).alloweddomains.alloweddomain
Leave a comment