Skip to content

Commit d89315d

Browse files
committed
CertificateFilePath updates
1 parent a993f68 commit d89315d

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

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

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,26 +83,19 @@ This example connects to Exchange Online PowerShell using modern authentication,
8383

8484
### Example 3
8585
```powershell
86-
Connect-ExchangeOnline -AppId <%App_id%> -CertificateFilePath "C:\users\navin\Documents\TestCert.pfx" -Organization "contoso.onmicrosoft.com"
87-
```
88-
89-
This example connects to Exchange Online PowerShell in an unattended scripting scenario using the public key of a certificate.
90-
91-
### Example 4
92-
```powershell
9386
Connect-ExchangeOnline -AppId <%App_id%> -CertificateThumbprint <%Thumbprint string of certificate%> -Organization "contoso.onmicrosoft.com"
9487
```
9588

9689
This example connects to Exchange Online PowerShell in an unattended scripting scenario using a certificate thumbprint.
9790

98-
### Example 5
91+
### Example 4
9992
```powershell
10093
Connect-ExchangeOnline -AppId <%App_id%> -Certificate <%X509Certificate2 object%> -Organization "contoso.onmicrosoft.com"
10194
```
10295

10396
This example connects to Exchange Online PowerShell in an unattended scripting scenario using a certificate file. This method is best suited for scenarios where the certificate is stored in remote machines and fetched at runtime. For example, the certificate is stored in the Azure Key Vault.
10497

105-
### Example 6
98+
### Example 5
10699
```powershell
107100
Connect-ExchangeOnline -Device
108101
```
@@ -111,7 +104,7 @@ In PowerShell 7.0.3 or later using version 2.0.4 or later of the module, this ex
111104

112105
The command returns a URL and unique code that's tied to the session. You need to open the URL in a browser on any computer, and then enter the unique code. After you complete the login in the web browser, the session in the Powershell 7 window is authenticated via the regular Azure AD authentication flow, and the Exchange Online cmdlets are imported after few seconds.
113106

114-
### Example 7
107+
### Example 6
115108
```powershell
116109
Connect-ExchangeOnline -InlineCredential
117110
```
@@ -357,7 +350,7 @@ Accept wildcard characters: False
357350
```
358351

359352
### -CertificateFilePath
360-
The CertificateFilePath parameter specifies the certificate that's used for CBA. A valid value is the complete public path to the certificate file.
353+
The CertificateFilePath parameter specifies the certificate that's used for CBA. A valid value is the complete public path to the certificate file. Use the CertificatePassword parameter with this parameter.
361354

362355
Don't use this parameter with the Certificate or CertificateThumbprint parameters.
363356

@@ -387,6 +380,8 @@ You can use the following methods as a value for this parameter:
387380

388381
For more information about CBA, see [App-only authentication for unattended scripts in the Exchange Online PowerShell module](https://aka.ms/exo-cba).
389382

383+
**Note**: Using a **ConvertTo-SecureString** command to store the password of the certificate locally defeats the purpose of a secure connection method for automation scenarios. Using a **Get-Credential** command to prompt you for the password of the certificate securely isn't ideal for automation scenarios. In other words, there's really no automated _and_ secure way to connect using a local certificate.
384+
390385
```yaml
391386
Type: SecureString
392387
Parameter Sets: (All)

exchange/exchange-ps/exchange/Connect-IPPSSession.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,12 @@ This example connects to Security & Compliance using modern authentication, with
6666

6767
### Example 3
6868
```powershell
69-
Connect-IPPSSession -AppId <%App_id%> -CertificateFilePath "C:\users\navin\Documents\TestCert.pfx" -Organization "contoso.onmicrosoft.com"
70-
```
71-
72-
This example connects to Security & Compliance PowerShell in an unattended scripting scenario using the public key of a certificate.
73-
74-
### Example 4
75-
```powershell
7669
Connect-IPPSSession -AppId <%App_id%> -CertificateThumbprint <%Thumbprint string of certificate%> -Organization "contoso.onmicrosoft.com"
7770
```
7871

7972
This example connects to Security & Compliance PowerShell in an unattended scripting scenario using a certificate thumbprint.
8073

81-
### Example 5
74+
### Example 4
8275
```powershell
8376
Connect-IPPSSession -AppId <%App_id%> -Certificate <%X509Certificate2 object%> -Organization "contoso.onmicrosoft.com"
8477
```
@@ -278,7 +271,7 @@ Accept wildcard characters: False
278271
```
279272

280273
### -CertificateFilePath
281-
The CertificateFilePath parameter specifies the certificate that's used for CBA. A valid value is the complete public path to the certificate file.
274+
The CertificateFilePath parameter specifies the certificate that's used for CBA. A valid value is the complete public path to the certificate file. Use the CertificatePassword parameter with this parameter.
282275

283276
Don't use this parameter with the Certificate or CertificateThumbprint parameters.
284277

@@ -308,6 +301,8 @@ You can use the following methods as a value for this parameter:
308301

309302
For more information about CBA, see [App-only authentication for unattended scripts in the Exchange Online PowerShell module](https://aka.ms/exo-cba).
310303

304+
**Note**: Using a **ConvertTo-SecureString** command to store the password of the certificate locally defeats the purpose of a secure connection method for automation scenarios. Using a **Get-Credential** command to prompt you for the password of the certificate securely isn't ideal for automation scenarios. In other words, there's really no automated _and_ secure way to connect using a local certificate.
305+
311306
```yaml
312307
Type: SecureString
313308
Parameter Sets: (All)

0 commit comments

Comments
 (0)