You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/app-only-auth-powershell-v2.md
+5-8Lines changed: 5 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,19 +14,16 @@ ms.custom:
14
14
ms.assetid:
15
15
search.appverid: MET150
16
16
ROBOTS: NOINDEX, NOFOLLOW
17
-
description: "Learn about using the Exchange Online V2 module in scripts and other long-running tasks."
17
+
description: "Learn about using the Exchange Online V2 module in scripts and other long-running tasks with Modern Authentication and app-only authentication."
18
18
---
19
19
20
-
# Automate tasks in Exchange Online using PowerShell with Modern Authentication
21
-
22
-
> [!NOTE]
23
-
> The features described in this topic are currently in Preview, are subject to change, and aren't available to everyone.
20
+
# App-only authentication in the EXO V2 module
24
21
25
22
Auditing and reporting scenarios in Exchange Online often involve scripts that run unattended. In most cases, these unattended scripts access Exchange Online PowerShell using Basic authentication (a username and password). Even when the connection to Exchange Online PowerShell uses Modern authentication, the credentials are stored in a local file or a secret vault that's access at run-time.
26
23
27
-
Because storing user credentials locally is not a good security practice, we're releasing this feature to support authentication for app-only scenarios using AzureAD applications and self-signed certificates.
24
+
Because storing user credentials locally is not a safe practice, we're releasing this feature to support authentication for unattended scripts (automation) scenarios using AzureAD applications and self-signed certificates.
28
25
29
-
The following examples show how to use the Exchange Online PowerShell V2 module with app-only authentication
26
+
The following examples show how to use the Exchange Online PowerShell V2 module with app-only authentication:
30
27
31
28
- Connect using a local certificate:
32
29
@@ -37,7 +34,7 @@ The following examples show how to use the Exchange Online PowerShell V2 module
When you use the _CertificateThumbPrint_ parameter, the certificate needs to be installed on the computer where you are running the command. The certificate should be installed in the user certificate store.
|_NetID_|n/a|**Get-LinkedUser** <br/> **Get-Mailbox** <br/> **Get-User**|String or `$null`|This property is populated for Exchange Online mailboxes in hybrid environments. A sample value is `1003BFFD9A0CFA03`. <br/> For example, `Get-User -Filter 'NetId -ne $null'`.|
|_ObjectCategory_|_objectCategory_|**Get-CASMailbox** <br/> **Get-Contact** <br/> **Get-DistributionGroup** <br/> **Get-DynamicDistributionGroup** <br/> **Get-Group** <br/> **Get-LinkedUser** <br/> **Get-Mailbox** <br/> **Get-MailContact** <br/> **Get-MailPublicFolder** <br/> **Get-MailUser** <br/> **Get-Recipient** <br/> **Get-RemoteMailbox** <br/> **Get-SecurityPrincipal** <br/> **Get-UMMailbox** <br/> **Get-User** <br/> **Get-UnifiedGroup**|String|This filter requires the canonical distinguished name of the object. The value uses the syntax `<___domain>/Configuration/Schema/<Type>`. <br/> Valid _\<Type\>_ values are: `Person` for mailboxes, mail users, and mail contacts, `Group` for distribution groups, mail-enabled security groups and Microsoft 365 groups, `ms-Exch-Public-Folder` for mail-enabled public folders, and `ms-Exch-Dynamic-Distribution-List` for dynamic distribution groups. <br/> For example, `Get-Recipient -Filter "ObjectCategory -eq 'contoso.com/Configuration/Schema/Group'"`.|
215
-
|_ObjectClass_|_objectClass_|**Get-CASMailbox** <br/> **Get-Contact** <br/> **Get-DistributionGroup** <br/> **Get-DynamicDistributionGroup** <br/> **Get-Group** <br/> **Get-LinkedUser** <br/> **Get-Mailbox** <br/> **Get-MailContact** <br/> **Get-MailPublicFolder** <br/> **Get-MailUser** <br/> **Get-Recipient** <br/> **Get-RemoteMailbox** <br/> **Get-SecurityPrincipal** <br/> **Get-UMMailbox** <br/> **Get-User** <br/> **Get-UnifiedGroup**|String|The value of this property is `top, person, organizationalPerson, user` for mailboxes and mail users, `top, person, organizationalPerson, contact` for mail contacts, `top, group` for distribution groups, mail-enabled security groups and Microsoft 365 groups, `msExchDynamicDistributionList` for dynamic distribution groups and `top, publicFolder` for mail-enabled public folders <br/> For example, `Get-Recipient -Filter "ObjectClass -eq 'Contact'"`. <br/> Although this is a multivalued property, the filter will return a match if the property _contains_ the specified value.|
214
+
|_ObjectCategory_|_objectCategory_|**Get-CASMailbox** <br/> **Get-Contact** <br/> **Get-DistributionGroup** <br/> **Get-DynamicDistributionGroup** <br/> **Get-Group** <br/> **Get-LinkedUser** <br/> **Get-Mailbox** <br/> **Get-MailContact** <br/> **Get-MailPublicFolder** <br/> **Get-MailUser** <br/> **Get-Recipient** <br/> **Get-RemoteMailbox** <br/> **Get-SecurityPrincipal** <br/> **Get-UMMailbox** <br/> **Get-User** <br/> **Get-UnifiedGroup**|String|This filter requires the canonical distinguished name of the object. The value uses the syntax `<___domain>/Configuration/Schema/<Type>`. <br/> Valid _\<Type\>_ values are: `Person` for mailboxes, mail users, and mail contacts, `Group` for distribution groups, mail-enabled security groups and Microsoft 365 Groups, `ms-Exch-Public-Folder` for mail-enabled public folders, and `ms-Exch-Dynamic-Distribution-List` for dynamic distribution groups. <br/> For example, `Get-Recipient -Filter "ObjectCategory -eq 'contoso.com/Configuration/Schema/Group'"`.|
215
+
|_ObjectClass_|_objectClass_|**Get-CASMailbox** <br/> **Get-Contact** <br/> **Get-DistributionGroup** <br/> **Get-DynamicDistributionGroup** <br/> **Get-Group** <br/> **Get-LinkedUser** <br/> **Get-Mailbox** <br/> **Get-MailContact** <br/> **Get-MailPublicFolder** <br/> **Get-MailUser** <br/> **Get-Recipient** <br/> **Get-RemoteMailbox** <br/> **Get-SecurityPrincipal** <br/> **Get-UMMailbox** <br/> **Get-User** <br/> **Get-UnifiedGroup**|String|The value of this property is `top, person, organizationalPerson, user` for mailboxes and mail users, `top, person, organizationalPerson, contact` for mail contacts, `top, group` for distribution groups, mail-enabled security groups and Microsoft 365 Groups, `msExchDynamicDistributionList` for dynamic distribution groups and `top, publicFolder` for mail-enabled public folders <br/> For example, `Get-Recipient -Filter "ObjectClass -eq 'Contact'"`. <br/> Although this is a multivalued property, the filter will return a match if the property _contains_ the specified value.|
216
216
|_Office_|_physicalDeliveryOfficeName_|**Get-Contact** <br/> **Get-LinkedUser** <br/> **Get-Mailbox** <br/> **Get-Recipient** <br/> **Get-User**|String (wildcards accepted) or `$null`|For example, `Get-User -Filter "Office -like '22*'"`.|
217
217
|_OfflineAddressBook_|_msExchUseOAB_|**Get-Mailbox**|String or `$null`|This filter requires the distinguished name of the offline address book. For example, `Get-Mailbox -Arbitration -Filter "OfflineAddressBook -eq 'CN=OAB 1,CN=Offline Address Lists,CN=Address Lists Container,CN=Contoso Corporation,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=contoso,DC=com'"` <br/> You can find the distinguished names of offline address books by running this command: `Get-OfflineAddressBook | Format-List Name,DistinguishedName`.|
218
218
|_OnPremisesObjectId_|n/a|**Get-MailPublicFolder**|String or `$null`|For example, `Get-MailPublicFolder -Filter 'OnPremisesObjectId -ne $null'`.|
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/mfa-connect-to-scc-powershell.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,10 @@ description: "Learn how to connect to Security & Compliance Center PowerShell by
18
18
If your account uses multi-factor authentication (MFA) or federated authentication, you can't use the instructions at [Connect to Security & Compliance Center PowerShell](connect-to-scc-powershell.md) to use remote PowerShell to connect to the Security & Compliance Center. Instead, you need to install the Exchange Online Remote PowerShell Module, and use the **Connect-IPPSSession** cmdlet to connect to Security & Compliance Center PowerShell.
19
19
20
20
> [!NOTE]
21
-
> Delegated Access Permission (DAP) partners can't use the procedures in this topic to connect to their customer tenant organizations in Security & Compliance Center PowerShell. MFA and the Exchange Online Remote PowerShell Module don't work with delegated authentication. <br/><br/> The Exchange Online Remote PowerShell Module is not supported in PowerShell Core (macOS, Linux, or Windows Nano Server). As a workaround, you can install the module on a computer that's running a supported version of Windows (physical or virtual), and use remote desktop software to connect.
21
+
>
22
+
> - Delegated Access Permission (DAP) partners can't use the procedures in this topic to connect to their customer tenant organizations in Security & Compliance Center PowerShell. MFA and the Exchange Online Remote PowerShell Module don't work with delegated authentication.
23
+
>
24
+
> - The Exchange Online Remote PowerShell Module is not supported in PowerShell Core (macOS, Linux, or Windows Nano Server). As a workaround, you can install the module on a computer that's running a supported version of Windows (physical or virtual), and use remote desktop software to connect.
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/open-the-exchange-management-shell.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,20 @@ When you open the Exchange Management Shell you can perform administrative tasks
31
31
> [!TIP]
32
32
> Having problems? Ask for help in the [Exchange Server](https://go.microsoft.com/fwlink/p/?linkId=60612) forums.
33
33
34
+
## Open the Exchange Management Shell in Windows Server 2019 Core
35
+
36
+
-**Mailbox servers**: Run the following command from a Command Prompt:
37
+
38
+
```dos
39
+
LaunchEMS
40
+
```
41
+
42
+
-**Edge Transport servers**: Run the following commands from a Command Prompt. Note that these are two separate commands on one line for ease of copying and running:
43
+
44
+
```dos
45
+
exshell.psc1 & exchange.ps1
46
+
```
47
+
34
48
## Open the Exchange Management Shell in Windows Server 2016 or Windows 10
35
49
36
50
Click **Start** > **Microsoft Exchange Server 2016 \>****Exchange Management Shell**.
In Office 365, this example assigns the administrator account [email protected] Full Access permission to all user mailboxes in the contoso.com Office 365 organization.
93
+
In Exchange Online, this example assigns the administrator account [email protected] Full Access permission to all user mailboxes in the contoso.com organization.
This parameter doesn't work in the Office 365 Security & Compliance Center.
160
+
This parameter doesn't work in the Security & Compliance Center.
161
161
162
162
The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.
0 commit comments