< Back
Connect-Office365
Post
NAME Connect-Office365
SYNOPSIS
Connect to Office 365 PowerShell using credentials stored in Credential Manager (Windows Generic Credentials).
SYNTAX
Connect-Office365 [-Tenant] <String> [-MFA] [<CommonParameters>]
DESCRIPTION
The Connect-Office365 cmdlet provides a secure way to connect to any Office 365 tenant
by using PowerShell. Select which services you want to connect to and hit enter.
MFA is partially supported.
Note: Please use your tenant name as your credential name (for instance: "contoso").
The credential name is used to connect to SharePoint, in this case: https://contoso-admin.sharepoint.com
PARAMETERS
-Tenant <String>
The value for this parameter is used to check the Windows Generic Credential Manager.
Please use your Office 365 tenant name (xxx.sharepoint.com) in the Internet or network address.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-MFA [<SwitchParameter>]
Should be used if MFA is enabled for your account.
When you use this switch parameter, you will be prompted for credentials when logging in to a service.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-Office365 -Tenant "Contoso"
Connects to tenant Contoso which uses no MFA.
The credential manager is checked for Windows Generic credentials with the name "Contoso".
It uses these credentials to connect to Office 365.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Connect-Office365 -Tenant "Fabrikam" -MFA
Connects to tenant "Fabrikam" which uses MFA. You will be prompted for credentials
RELATED LINKS
SYNOPSIS
Connect to Office 365 PowerShell using credentials stored in Credential Manager (Windows Generic Credentials).
SYNTAX
Connect-Office365 [-Tenant] <String> [-MFA] [<CommonParameters>]
DESCRIPTION
The Connect-Office365 cmdlet provides a secure way to connect to any Office 365 tenant
by using PowerShell. Select which services you want to connect to and hit enter.
MFA is partially supported.
Note: Please use your tenant name as your credential name (for instance: "contoso").
The credential name is used to connect to SharePoint, in this case: https://contoso-admin.sharepoint.com
PARAMETERS
-Tenant <String>
The value for this parameter is used to check the Windows Generic Credential Manager.
Please use your Office 365 tenant name (xxx.sharepoint.com) in the Internet or network address.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-MFA [<SwitchParameter>]
Should be used if MFA is enabled for your account.
When you use this switch parameter, you will be prompted for credentials when logging in to a service.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Connect-Office365 -Tenant "Contoso"
Connects to tenant Contoso which uses no MFA.
The credential manager is checked for Windows Generic credentials with the name "Contoso".
It uses these credentials to connect to Office 365.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Connect-Office365 -Tenant "Fabrikam" -MFA
Connects to tenant "Fabrikam" which uses MFA. You will be prompted for credentials
RELATED LINKS