Skip to content

Commit ed290b2

Browse files
authored
Update Set-CsTenantFederationConfiguration.md
Adding Block-All example
1 parent 272cf38 commit ed290b2

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

teams/teams-ps/MicrosoftTeams/Set-CsTenantFederationConfiguration.md

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -108,46 +108,55 @@ When this command completes, the blocked domain list will be cleared.
108108

109109
### Example 6
110110
```
111+
Set-CsTenantFederationConfiguration -AllowedDomains $Null
112+
```
113+
114+
Example 6 shows how you can remove all the domains assigned to the allowed domains list for the current tenant, thereby blocking external communication for all users in the Tenant. In case `AllowFederatedUsers` is set to `True`, then explicit `ExternalAccessPolicy` instances can be leveraged to set a per-user federation setting.
115+
To do this, simply include the AllowedDomains parameter and set the parameter value to null ($Null).
116+
When this command completes, the allowed domain list will be cleared.
117+
118+
### Example 7
119+
```
111120
$list = New-Object Collections.Generic.List[String]
112121
$list.add("contoso.com")
113122
$list.add("fabrikam.com")
114123
Set-CsTenantFederationConfiguration -AllowedDomainsAsAList $list
115124
```
116125

117-
Example 6 shows how you can replace domains in the Allowed Domains using a List collection object.
126+
Example 7 shows how you can replace domains in the Allowed Domains using a List collection object.
118127
First, a List collection is created and domains are added to it, then, simply include the AllowedDomainsAsAList parameter and set the parameter value to the List object.
119128
When this command completes, the allowed domains list will be replaced with those domains.
120129

121-
### Example 7
130+
### Example 8
122131
```
123132
$list = New-Object Collections.Generic.List[String]
124133
$list.add("contoso.com")
125134
$list.add("fabrikam.com")
126135
Set-CsTenantFederationConfiguration -AllowedDomainsAsAList @{Add=$list}
127136
```
128137

129-
Example 7 shows how you can add domains to the existing Allowed Domains using a List object.
138+
Example 8 shows how you can add domains to the existing Allowed Domains using a List object.
130139
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.
131140

132-
### Example 8
141+
### Example 9
133142
```
134143
$list = New-Object Collections.Generic.List[String]
135144
$list.add("contoso.com")
136145
$list.add("fabrikam.com")
137146
Set-CsTenantFederationConfiguration -AllowedDomainsAsAList @{Remove=$list}
138147
```
139148

140-
Example 8 shows how you can remove domains from the existing Allowed Domains using a List object.
149+
Example 9 shows how you can remove domains from the existing Allowed Domains using a List object.
141150
First, a List is created and domains are added to it, then use the Remove method in the AllowedDomainsAsAList parameter to remove the domains from the existing allowed domains list. When this command completes, the domains in the list will be removed from the AllowedDomains list.
142151

143-
### Example 9
152+
### Example 10
144153
```
145154
Set-CsTenantFederationConfiguration -AllowTeamsConsumer $True -AllowTeamsConsumerInbound $False
146155
```
147156

148-
The command shown in Example 9 enables communication with people using Teams with an account that's not managed by an organization, to only be initiated by people in your organization. This means that people using Teams with an account that's not managed by an organization will not be able to discover or start a conversation with people in your organization.
157+
The command shown in Example 10 enables communication with people using Teams with an account that's not managed by an organization, to only be initiated by people in your organization. This means that people using Teams with an account that's not managed by an organization will not be able to discover or start a conversation with people in your organization.
149158

150-
### Example 10
159+
### Example 11
151160
```
152161
$list = New-Object Collections.Generic.List[String]
153162
$list.add("contoso.com")
@@ -157,20 +166,20 @@ Set-CsTenantFederationConfiguration -BlockedDomains $list
157166
Set-CsTenantFederationConfiguration -BlockAllSubdomains $True
158167
```
159168

160-
Example 10 shows how you can block all subdomains of domains in BlockedDomains list.
169+
Example 11 shows how you can block all subdomains of domains in BlockedDomains list.
161170
In this example, all users from contoso.com and fabrikam.com will be blocked.
162171
When the BlockAllSubdomains is enabled, all users from all subdomains of all domains in BlockedDomains list will also be blocked.
163172
So, users from subdomain.contoso.com and subdomain.fabrikam.com will be blocked.
164173
Note: Users from subcontoso.com will not be blocked because it's a completely different domain rather than a subdomain of contoso.com.
165174

166-
### Example 11
175+
### Example 12
167176
```
168177
Set-CsTenantFederationConfiguration -ExternalAccessWithTrialTenants "Allowed"
169178
```
170179

171-
Example 11 shows how you can allow users to communicate with users in tenants that contain only trial licenses (default value is Blocked).
180+
Example 12 shows how you can allow users to communicate with users in tenants that contain only trial licenses (default value is Blocked).
172181

173-
### Example 12
182+
### Example 13
174183
```
175184
$list = New-Object Collections.Generic.List[String]
176185
$list.add("contoso.com")
@@ -179,44 +188,44 @@ $list.add("fabrikam.com")
179188
Set-CsTenantFederationConfiguration -AllowedTrialTenantDomains $list
180189
```
181190

182-
Using the `AllowedTrialTenantDomains` parameter, you can whitelist specific "trial-only" tenant domains, while keeping the `ExternalAccessWithTrialTenants` set to `Blocked`. Example 12 shows how you can set or replace domains in the Allowed Trial Tenant Domains using a List collection object.
191+
Using the `AllowedTrialTenantDomains` parameter, you can whitelist specific "trial-only" tenant domains, while keeping the `ExternalAccessWithTrialTenants` set to `Blocked`. Example 13 shows how you can set or replace domains in the Allowed Trial Tenant Domains using a List collection object.
183192
First, a List collection is created and domains are added to it, then, simply include the `AllowedTrialTenantDomains` parameter and set the parameter value to the List object.
184193
When this command completes, the Allowed Trial Tenant Domains list will be replaced with those domains.
185194

186-
### Example 13
195+
### Example 14
187196
```
188197
Set-CsTenantFederationConfiguration -AllowedTrialTenantDomains @("contoso.com", "fabrikam.com")
189198
```
190199

191-
Example 13 shows another way to set a value of `AllowedTrialTenantDomains`. It uses array of objects and it always replaces value of the `AllowedTrialTenantDomains`. When this command completes, the result is the same as in example 12.
200+
Example 14 shows another way to set a value of `AllowedTrialTenantDomains`. It uses array of objects and it always replaces value of the `AllowedTrialTenantDomains`. When this command completes, the result is the same as in example 13.
192201

193202
The array of `AllowedTrialTenantDomains` can be emptied by running the following command: `Set-CsTenantFederationConfiguration -AllowedTrialTenantDomains @()`.
194203

195-
### Example 14
204+
### Example 15
196205
```
197206
$list = New-Object Collections.Generic.List[String]
198207
$list.add("contoso.com")
199208
200209
Set-CsTenantFederationConfiguration -AllowedTrialTenantDomains @{Add=$list}
201210
```
202211

203-
Example 14 shows how you can add domains to the existing Allowed Trial Tenant Domains using a List collection object.
212+
Example 15 shows how you can add domains to the existing Allowed Trial Tenant Domains using a List collection object.
204213
First, a List is created and domains are added to it, then, use the Add method in the `AllowedTrialTenantDomains` parameter to add the domains to the existing allowed domains list.
205214
When this command completes, the domains in the list will be added to any domains already on the Allowed Trial Tenant Domains list.
206215

207-
### Example 15
216+
### Example 16
208217
```
209218
$list = New-Object Collections.Generic.List[String]
210219
$list.add("contoso.com")
211220
212221
Set-CsTenantFederationConfiguration -AllowedTrialTenantDomains @{Remove=$list}
213222
```
214223

215-
Example 15 shows how you can remove domains from the existing Allowed Trial Tenant Domains using a List collection object.
224+
Example 16 shows how you can remove domains from the existing Allowed Trial Tenant Domains using a List collection object.
216225
First, a List is created and domains are added to it, then use the Remove method in the `AllowedTrialTenantDomains` parameter to remove the domains from the existing allowed domains list.
217226
When this command completes, the domains in the list will be removed from the Allowed Trial Tenant Domains list.
218227

219-
### Example 16
228+
### Example 17
220229
```
221230
Set-CsTenantFederationConfiguration -DomainBlockingForMDOAdminsInTeams "Enabled"
222231
```

0 commit comments

Comments
 (0)