Skip to content

Commit 8bd61e7

Browse files
committed
Update Connect-ExchangeOnline.md
Updated examples
1 parent e76a4be commit 8bd61e7

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

exchange/exchange-ps/exchange/Connect-ExchangeOnline.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The second command connects the current PowerShell session using the credentials
6666

6767
After the Connect-ExchangeOnline command is successful, you can run ExO V2 module cmdlets and older remote PowerShell cmdlets.
6868

69-
### Example 2
69+
### Example 2
7070
```powershell
7171
Connect-ExchangeOnline -UserPrincipalName [email protected] -ShowProgress $true
7272
```
@@ -75,6 +75,25 @@ This command connects the current PowerShell session using [email protected] acc
7575

7676
After the Connect-ExchangeOnline command is successful, you can run ExO V2 module cmdlets and older remote PowerShell cmdlets.
7777

78+
### Example 3 : Connect to EXO using Certificate Based Authentication
79+
```powershell
80+
Connect-ExchangeOnline -AppId <%App_id%> -CertificateFilePath "C:\users\johndoe\Documents\TestCert.pfx" -Organization "contoso.onmicrosoft.com"
81+
```
82+
This command connects to Exchange Online using public key of certificate in case of Unattended scripting.
83+
84+
85+
### Example 4 : Connect to EXO using Certificate Based Authentication and Thumprint
86+
```powershell
87+
Connect-ExchangeOnline -AppId <%App_id%> -CertificateThumbprint <%Thumbprint string of certificate%> -Organization "contoso.onmicrosoft.com"
88+
```
89+
Use this syntax to connect to Exchange Online in unattended scripting scenarios using Certificate Thumbprint.
90+
91+
### Example 5 : Connect to EXO using Certificate Based Authentication and Certificate File
92+
```powershell
93+
Connect-ExchangeOnline -AppId <%App_id%> -Certificate <%X509Certificate object%> -Organization "contoso.onmicrosoft.com"
94+
```
95+
Use this syntax to connect to Exchange Online in unattended scripting scenarios using Certificate File. This is more suited for scenarios where certificate is stored in remote machines and fetched at run-time. For eg Certificates stored in Azure Key Vault and used for EXO scripting.
96+
7897
## PARAMETERS
7998

8099
**Note**: If you use the ExchangeEnvironmentName parameter, you don't need to use the AzureADAuthorizationEndpointUri or ConnectionUri parameters.
@@ -397,7 +416,7 @@ Accept wildcard characters: False
397416
```
398417

399418
### -FormatTypeName
400-
419+
Use this parameter to format the output of cmdlet
401420

402421
```yaml
403422
Type: String[]

0 commit comments

Comments
 (0)