Skip to content

Commit 59d5baa

Browse files
authored
Merge pull request #10764 from VikneshMSFT/main
adding docs for set-teamsenvironmentconfig and clear-teamsenvironment…
2 parents 20a2152 + 65801fc commit 59d5baa

File tree

3 files changed

+199
-0
lines changed

3 files changed

+199
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
external help file: Microsoft.TeamsCmdlets.PowerShell.Connect.dll-Help.xml
3+
Module Name: MicrosoftTeams
4+
online version:
5+
schema: 2.0.0
6+
author: VikneshMSFT
7+
ms.author: vimohan
8+
ms.reviewer: pbafna
9+
manager: vinelap
10+
---
11+
12+
# Clear-TeamsEnvironmentConfig
13+
14+
## SYNOPSIS
15+
Clears environment-specific configurations from the local machine set by running Set-TeamsEnvironmentConfig.
16+
17+
## SYNTAX
18+
19+
```
20+
Clear-TeamsEnvironmentConfig [<CommonParameters>]
21+
```
22+
23+
## DESCRIPTION
24+
This cmdlet clears environment-specific configurations from the local machine set by running Set-TeamsEnvironmentConfig. This helps in clearing and rectifying any wrong information set in Set-TeamsEnvironmentConfig.
25+
26+
## EXAMPLES
27+
28+
### Example 1
29+
```powershell
30+
PS C:\> Clear-TeamsEnvironmentConfig
31+
```
32+
33+
Clears environment-specific configurations from the local machine set by running Set-TeamsEnvironmentConfig.
34+
35+
## PARAMETERS
36+
37+
### CommonParameters
38+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
39+
40+
## INPUTS
41+
42+
### None
43+
44+
## OUTPUTS
45+
46+
### System.Object
47+
48+
## NOTES
49+
50+
We do not recommend using Clear-TeamsEnvironmentConfig in Commercial, GCC, GCC High, or DoD environments. This cmdlet is available in Microsoft Teams PowerShell module from version 5.2.0-GA.
51+
52+
## RELATED LINKS
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
external help file: Microsoft.TeamsCmdlets.PowerShell.Connect.dll-Help.xml
3+
Module Name: MicrosoftTeams
4+
online version:
5+
schema: 2.0.0
6+
author: VikneshMSFT
7+
ms.author: vimohan
8+
ms.reviewer: pbafna
9+
manager: vinelap
10+
---
11+
12+
# Set-TeamsEnvironmentConfig
13+
14+
## SYNOPSIS
15+
16+
Sets environment-specific configurations on the local machine and is used to connect to the right environment when running Connect-MicrosoftTeams.
17+
18+
## SYNTAX
19+
20+
```
21+
Set-TeamsEnvironmentConfig [-EndpointUris <Hashtable>] [-TeamsEnvironmentName <String>] [-WhatIf] [-Confirm]
22+
[<CommonParameters>]
23+
```
24+
25+
## DESCRIPTION
26+
This cmdlet sets environment-specific configurations like endpoint URIs(such as Azure AD and Microsoft Graph) and Teams environment (such as GCCH and DOD) on the local machine.
27+
28+
When running Connect-MicrosoftTeams, environment-specific information set in this cmdlet will be considered unless overridden by Connect-MicrosoftTeams parameters.
29+
30+
Parameters passed to Connect-MicrosoftTeams will take precedence over the information set by this cmdlet.
31+
32+
Clear-TeamsEnvironmentConfig should not be used in Commercial, GCC, GCC High, or DoD environments.
33+
34+
## EXAMPLES
35+
36+
### Example 1
37+
```powershell
38+
PS C:\> Set-TeamsEnvironmentConfig -TeamsEnvironmentName TeamsChina
39+
```
40+
41+
Sets the environment as Gallatin China on a local machine and when Connect-MicrosoftTeams is run, authentication will happen in the Gallatin China cloud and Microsoft Teams module will connect to the Gallatin environment.
42+
43+
### Example 2
44+
```powershell
45+
$endPointUriDict = @{ActiveDirectory = 'https://login.microsoftonline.us/';MsGraphEndpointResourceId = 'https://graph.microsoft.us'}
46+
Set-TeamsEnvironmentConfig -TeamsEnvironmentName $endPointUriDict
47+
```
48+
Sets endpoint URIs required for special clouds.
49+
50+
### Example 3
51+
```powershell
52+
Set-TeamsEnvironmentConfig -TeamsEnvironmentName TeamsChina
53+
54+
$cred=get-credential
55+
Move-CsUser -Identity "[email protected]" -Target "sipfed.online.lync.com" -Credential $cred
56+
```
57+
This cmdlet is mainly introduced to support Skype for Business to Microsoft Teams user migration using Move-CsUser.
58+
59+
This example shows how tenant admins can run Move-CsUser in Gallatin and other special clouds after setting the environment configuration using Set-TeamsEnvironmentConfig.
60+
61+
Note that Set-TeamsEnvironmentConfig needs to be run only once for each machine. There is no need to run it each time before running Move-CsUser.
62+
63+
## PARAMETERS
64+
65+
### -Confirm
66+
Prompts you for confirmation before running the cmdlet.
67+
68+
```yaml
69+
Type: SwitchParameter
70+
Parameter Sets: (All)
71+
Aliases: cf
72+
73+
Required: False
74+
Position: Named
75+
Default value: None
76+
Accept pipeline input: False
77+
Accept wildcard characters: False
78+
```
79+
80+
### -EndpointUris
81+
Provides custom endpoints.
82+
83+
```yaml
84+
Type: Hashtable
85+
Parameter Sets: (All)
86+
Aliases:
87+
88+
Required: False
89+
Position: Named
90+
Default value: None
91+
Accept pipeline input: False
92+
Accept wildcard characters: False
93+
```
94+
95+
### -TeamsEnvironmentName
96+
Provides a Teams environment to connect to, for example, Teams GCCH or Teams DoD.
97+
98+
```yaml
99+
Type: String
100+
Parameter Sets: (All)
101+
Aliases:
102+
103+
Required: False
104+
Position: Named
105+
Default value: None
106+
Accept pipeline input: False
107+
Accept wildcard characters: False
108+
```
109+
110+
### -WhatIf
111+
Shows what would happen if the cmdlet runs.
112+
The cmdlet is not run.
113+
114+
```yaml
115+
Type: SwitchParameter
116+
Parameter Sets: (All)
117+
Aliases: wi
118+
119+
Required: False
120+
Position: Named
121+
Default value: None
122+
Accept pipeline input: False
123+
Accept wildcard characters: False
124+
```
125+
126+
### CommonParameters
127+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
128+
129+
## INPUTS
130+
131+
### None
132+
133+
## OUTPUTS
134+
135+
### System.Object
136+
137+
## NOTES
138+
139+
Set-TeamsEnvironmentConfig should not be used in Commercial, GCC, GCC High, or DoD environments.
140+
141+
## RELATED LINKS

teams/teams-ps/teams/teams.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,9 @@ Use this cmdlet to update values in existing Teams enhanced encryption policy.
187187

188188
### [Update-CsTeamsShiftsConnectionInstance](Update-CsTeamsShiftsConnectionInstance.md)
189189
This cmdlet updates Shifts connection instance fields.
190+
191+
### [Set-TeamsEnvironmentConfig](Set-TeamsEnvironmentConfig.md)
192+
This cmdlet sets environment-specific configurations like endpoint URIs and Teams environment in the local machine.
193+
194+
### [Clear-TeamsEnvironmentConfig](Clear-TeamsEnvironmentConfig.md)
195+
Clears environment-specific configurations from the local machine set by running Set-TeamsEnvironmentConfig.

0 commit comments

Comments
 (0)