|
| 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 |
0 commit comments