Command
Connect-Tenant
Description
The command to connect to a Microsoft 365 tenant to do a copy.
Note: Connect-Tenant only works with Microsoft Teams (Copy-Team and Get-Team) at the moment.
Index
Examples
Connect to Microsoft 365 tenant with current user credentials
Connect-Tenant -Domain mytenantdomain
Connect to Microsoft 365 tenant with username
Connect-Tenant -Domain mytenantdomain -Username myusername
Connect to Microsoft 365 tenant with username and password
$mypassword = ConvertTo-SecureString "mypassword" -AsPlainText -Force $mytenant = Connect-Tenant -Domain mytenantdomain -Username myusername -Password $mypassword
Connect to Microsoft 365 tenant without single sign on (SSO)
Connect-Tenant -Domain mytenantdomain -Browser -DisableSSO
Connect to Microsoft 365 tenant with proxy settings
$proxySettings = New-ProxySettings -Server myproxyserver -Port 888 Connect-Tenant -Domain mytenantdomain -ProxySettings $proxySettings
Connect to Microsoft 365 tenant using Browser Authentication
Connect-Tenant -Domain mytenantdomain -Browser
Connect to Microsoft 365 tenant using Browser Authentication with proxy settings
$proxySettings = New-ProxySettings -Server myproxyserver -Port 888 Connect-Tenant -Domain mytenantdomain -Browser -ProxySettings $proxySettings
Syntax
Connect-Tenant
-Domain <String>
[-AddToExplorer <SwitchParameter>]
[-ProxySettings <ProxySettings>]
Connect-Tenant
-Domain <String>
-Credential <PSCredential>
[-AddToExplorer <SwitchParameter>]
[-ProxySettings <ProxySettings>]
Connect-Tenant
-Domain <String>
-UserName <String>
-Password <SecureString>
[-AddToExplorer <SwitchParameter>]
[-ProxySettings <ProxySettings>]
Connect-Tenant
-Domain <String>
-Browser <SwitchParameter>
[-AddToExplorer <SwitchParameter>]
[-DisableSSO <SwitchParameter>]
[-ProxySettings <ProxySettings>]
Parameters
-AddToExplorer <SwitchParameter>
Adds the connection to the ShareGate explorer.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Browser <SwitchParameter>
Use browser authentication.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Browser |
Aliases | None |
-Credential <PSCredential>
Specifies the credentials.
Required? | True |
Default value | None |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | Credential |
Aliases | None |
-DisableSSO <SwitchParameter>
Disables the auto-login feature in order to connect to a Microsoft 365 site with another user account.
Required? | False |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Browser |
Aliases | None |
-Domain <String>
Sets the domain name of the Microsoft 365 tenant. The domain name is 'contoso' in this example: 'https://contoso.sharepoint.com/sites/sitecollection'
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-Password <SecureString>
Specifies the password.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Manual |
Aliases | None |
-ProxySettings <ProxySettings>
Sets the proxy settings to connect to the SharePoint site.
Required? | False |
Default value | None |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | False |
Parameter set name | (All) |
Aliases | None |
-UserName <String>
Specifies the username.
Required? | True |
Default value | None |
Accept pipeline input? | False |
Accept wildcard characters? | False |
Parameter set name | Manual |
Aliases | None |
Comments
0 comments
Please sign in to leave a comment.