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/exchange-online/connect-to-exchange-online-powershell/connect-to-exchange-online-powershell.md
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Connect to Exchange Online PowerShell"
3
3
ms.author: chrisda
4
4
author: chrisda
5
-
manager: serdars
5
+
manager: dansimp
6
6
ms.date: 7/10/2017
7
7
ms.audience: Admin
8
8
ms.topic: article
@@ -16,10 +16,11 @@ description: "Learn how to use remote PowerShell to connect to Exchange Online."
16
16
---
17
17
18
18
# Connect to Exchange Online PowerShell
19
+
19
20
Exchange Online PowerShell allows you to manage your Exchange Online settings from the command line. You use Windows PowerShell on your local computer to create a remote PowerShell session to Exchange Online. It's a simple three-step process where you enter your Office 365 credentials, provide the required connection settings, and then import the Exchange Online cmdlets into your local Windows PowerShell session so that you can use them.
20
21
21
22
> [!IMPORTANT]
22
-
> If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, you need to download and use the Exchange Online Remote PowerShell Module. For more information, see [Connect to Exchange Online PowerShell using multi-factor authentication](mfa-connect-to-exchange-online-powershell.md). <br/><br/> If you're an Exchange Online Protection (EOP) standalone customer, and you're using the service to protect on-premises mailboxes, use the connection instructions in the topic [Connect to Exchange Online Protection PowerShell](../../exchange-eop/connect-to-exchange-online-protection-powershell.md). If your EOP subscription is Exchange Enterprise CAL with Services (includes data loss prevention (DLP) and reporting using web services), the connection instructions in this topic will work for you.
23
+
> If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, you need to download and use the Exchange Online Remote PowerShell Module. For more information, see [Connect to Exchange Online PowerShell using multi-factor authentication](mfa-connect-to-exchange-online-powershell.md). <br/><br/> If you're a standalone Exchange Online Protection (EOP) customer (for example, you're using EOP to protect your on-premises email environment), use the connection instructions in [Connect to Exchange Online Protection PowerShell](../../exchange-eop/connect-to-exchange-online-protection-powershell.md). If your standalone EOP subscription is Exchange Enterprise CAL with Services (includes data loss prevention (DLP) and reporting using web services), the connection instructions in this topic will work for you.
23
24
24
25
## What do you need to know before you begin?
25
26
@@ -31,6 +32,8 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
31
32
32
33
- Windows 8.1
33
34
35
+
- Windows Server 2019
36
+
34
37
- Windows Server 2016
35
38
36
39
- Windows Server 2012 or Windows Server 2012 R2
@@ -47,7 +50,7 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
47
50
48
51
To require all PowerShell scripts that you download from the internet are signed by a trusted publisher, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you open by selecting **Run as administrator**):
49
52
50
-
```
53
+
```PowerShell
51
54
Set-ExecutionPolicy RemoteSigned
52
55
```
53
56
@@ -60,15 +63,15 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
60
63
61
64
1. On your local computer, open Windows PowerShell and run the following command.
62
65
63
-
```
66
+
```PowerShell
64
67
$UserCredential = Get-Credential
65
68
```
66
69
67
70
In the **Windows PowerShell Credential Request** dialog box, type your work or school account and password, and then click **OK**.
@@ -86,16 +89,16 @@ Exchange Online PowerShell allows you to manage your Exchange Online settings fr
86
89
87
90
For more information, see [New-PSSessionOption](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/new-pssessionoption).
88
91
89
-
3. Run the following command.
92
+
3. Run the following command:
90
93
91
-
```
94
+
```PowerShell
92
95
Import-PSSession $Session -DisableNameChecking
93
96
```
94
97
95
98
> [!NOTE]
96
-
> Be sure to disconnect the remote PowerShell session when you're finished. If you close the Windows PowerShell window without disconnecting the session, you could use up all the remote PowerShell sessions available to you, and you'll need to wait for the sessions to expire. To disconnect the remote PowerShell session, run the following command.
99
+
> Be sure to disconnect the remote PowerShell session when you're finished. If you close the Windows PowerShell window without disconnecting the session, you could use up all the remote PowerShell sessions available to you, and you'll need to wait for the sessions to expire. To disconnect the remote PowerShell session, run the following command.
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/exchange-online/connect-to-exchange-online-powershell/mfa-connect-to-exchange-online-powershell.md
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,8 @@
2
2
title: "Connect to Exchange Online PowerShell using multi-factor authentication"
3
3
ms.author: chrisda
4
4
author: chrisda
5
-
ms.date: 10/24/2017
5
+
manager: dansimp
6
+
ms.date:
6
7
ms.audience: Admin
7
8
ms.topic: article
8
9
ms.service: exchange-online
@@ -13,10 +14,11 @@ description: "Learn how to connect to Exchange Online PowerShell by using multi-
13
14
---
14
15
15
16
# Connect to Exchange Online PowerShell using multi-factor authentication
17
+
16
18
If you want to use multi-factor authentication (MFA) to connect to Exchange Online PowerShell, you can't use the instructions at [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell.md) to use remote PowerShell to connect to Exchange Online. MFA requires you to install the Exchange Online Remote PowerShell Module, and use the **Connect-EXOPSSession** cmdlet to connect.
17
19
18
20
> [!NOTE]
19
-
> • Delegated Access Permission (DAP) partners can't use the procedures in this topic to connect to their customer tenant organizations in Exchange Online PowerShell. MFA and the Exchange Online Remote PowerShell Module don't work with delegated authentication. <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
+
> • Delegated Access Permission (DAP) partners can't use the procedures in this topic to connect to their customer tenant organizations in Exchange Online 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.
20
22
21
23
## What do you need to know before you begin?
22
24
@@ -28,6 +30,8 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
28
30
29
31
- Windows 8.1
30
32
33
+
- Windows Server 2019
34
+
31
35
- Windows Server 2016
32
36
33
37
- Windows Server 2012 or Windows Server 2012 R2
@@ -54,13 +58,13 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
54
58
55
59
- Windows Remote Management (WinRM) on your computer needs to allow basic authentication (it's enabled by default). To verify that basic authentication is enabled, run this command in a Command Prompt:
56
60
57
-
```
61
+
```PowerShell
58
62
winrm get winrm/config/client/auth
59
63
```
60
64
61
65
If you don't see the value `Basic = true`, you need to run this command to enable basic authentication for WinRM:
62
66
63
-
```
67
+
```PowerShell
64
68
winrm set winrm/config/client/auth @{Basic="true"}
65
69
```
66
70
@@ -79,7 +83,7 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
79
83
80
84
2. The command that you need to run uses the following syntax:
@@ -119,7 +123,7 @@ If you want to use multi-factor authentication (MFA) to connect to Exchange Onli
119
123
> [!NOTE]
120
124
> Be sure to disconnect the remote PowerShell session when you're finished. If you close the Exchange Online Remote PowerShell Module window without disconnecting the session, you could use up all the remote PowerShell sessions available to you, and you'll need to wait for the sessions to expire. To disconnect all currently open PowerShell sessions in the current window, run the following command:
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/exchange-online/disable-access-to-exchange-online-powershell.md
+39-43Lines changed: 39 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Enable or disable access to Exchange Online PowerShell"
3
3
ms.author: chrisda
4
4
author: chrisda
5
-
manager: serdars
5
+
manager: dansimp
6
6
ms.date:
7
7
ms.audience: Admin
8
8
ms.topic: article
@@ -14,122 +14,118 @@ description: "Admins can learn how to enable or disable access to Exchange Onlin
14
14
---
15
15
16
16
# Enable or disable access to Exchange Online PowerShell
17
+
17
18
Exchange Online PowerShell enables you to manage your Exchange Online organization from the command line. By default, all accounts you create in Office 365 are allowed to use Exchange Online PowerShell. Administrators can use Exchange Online PowerShell to enable or disable a user's ability to connect to Exchange Online PowerShell. Note that access to Exchange Online PowerShell doesn't give users extra administrative powers in your organization. A user's capabilities in Exchange Online PowerShell are still defined by role based access control (RBAC) and the roles that are assigned to them.
18
-
19
+
19
20
## What do you need to know before you begin?
20
21
21
22
- Estimated time to complete each procedure: less than 5 minutes
22
-
23
+
23
24
- Office 365 global admins have access to Exchange Online PowerShell, and can use the procedures in this topic to configure Exchange Online PowerShell access for other users. For more information about permissions in Exchange Online, see [Feature Permissions in Exchange Online](https://technet.microsoft.com/library/15073ce1-0917-403b-8839-02a2ebc96e16.aspx).
24
-
25
+
25
26
- You can only use Exchange Online PowerShell to perform this procedure. To learn how to use Windows PowerShell to connect to Exchange Online, see [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell/connect-to-exchange-online-powershell.md).
26
-
27
-
27
+
28
28
> [!TIP]
29
-
> Having problems? Ask for help in the Exchange forums. Visit the forums at: [Exchange Online](https://go.microsoft.com/fwlink/p/?linkId=267542), or [Exchange Online Protection](https://go.microsoft.com/fwlink/p/?linkId=285351).
30
-
29
+
> Having problems? Ask for help in the Exchange forums. Visit the forums at: [Exchange Online](https://go.microsoft.com/fwlink/p/?linkId=267542), or [Exchange Online Protection](https://go.microsoft.com/fwlink/p/?linkId=285351).
30
+
31
31
## Enable or disable access to Exchange Online PowerShell for a user
32
32
33
33
This example disables access to Exchange Online PowerShell for the user [email protected].
## Disable access to Exchange Online PowerShell for many users
46
46
47
47
To prevent access to Exchange Online PowerShell for a specific group of existing users, you have the following options:
48
-
48
+
49
49
-**Filter users based on an existing attribute**: This method assumes that the target user accounts all share a unique filterable attribute. Some attributes, such as Title, Department, address information, and telephone number, are visible only when you use the **Get-User** cmdlet. Other attributes, such as CustomAttribute1-15, are visible only when you use the **Get-Mailbox** cmdlet.
50
-
50
+
51
51
-**Use a list of specific users**: After you generate the list of specific users, you can use that list to disable their access to Exchange Online PowerShell.
52
-
52
+
53
53
### Filter users based on an existing attribute
54
54
55
55
To disable access to Exchange Online PowerShell for any number of users based on an existing attribute, use the following syntax:
This example uses the text file C:\My Documents\NoPowerShell.txt to identify the users by their accounts. The text file must contain one account on each line as follows:
Copy file name to clipboardExpand all lines: exchange/docs-conceptual/exchange-online/exchange-online-powershell.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: "Exchange Online PowerShell"
3
3
ms.author: chrisda
4
4
author: chrisda
5
-
manager: serdars
5
+
manager: dansimp
6
6
ms.date: 2/20/2018
7
7
ms.audience: Admin
8
8
ms.topic: article
@@ -16,17 +16,17 @@ description: "Learn about using PowerShell in Exchange Online"
16
16
# Exchange Online PowerShell
17
17
18
18
Exchange Online PowerShell is the administrative interface that enables you to manage your Microsoft Exchange Online organization from the command line. For example, you can use Exchange Online PowerShell to configure mail flow rules (also known as transport rules) and connectors. The following topics provide information about using Exchange Online PowerShell:
19
-
19
+
20
20
- To create a remote PowerShell session to your Exchange Online organization, see [Connect to Exchange Online PowerShell](connect-to-exchange-online-powershell/connect-to-exchange-online-powershell.md).
21
21
22
22
- To prevent or allow connections to connect to your Exchange Online organization using remote PowerShell, see [Enable or disable access to Exchange Online PowerShell](disable-access-to-exchange-online-powershell.md).
23
23
24
24
- The following introductory video shows you how to connect to and use Exchange Online PowerShell.
25
-
26
-
**Note:** This video applies to Exchange Online and Exchange Online Protection (EOP) organizations. When you connect to your organization, be careful to specify the correct URL (*ConnectionUri* value). The required URL is different for Exchange Online and EOP organizations.
27
-
25
+
26
+
**Note:** This video applies to Exchange Online and standalone Exchange Online Protection (EOP) organizations. When you connect to your organization, be sure to specify the correct URL (*ConnectionUri* value). The required URL is different for Exchange Online and EOP organizations.
27
+
28
28
[Use Remote PowerShell in EOP](https://videoplayercdn.osi.office.net/hub/?csid=ux-cms-en-us-msoffice&uuid=9cb28006-c2cb-45b6-b72e-eeed8767dee7&AutoPlayVideo=false)
29
-
29
+
30
30
- To find the permissions you need to run a specific cmdlet, or one or more parameters on the cmdlet, see [Find the permissions required to run any Exchange cmdlet](../exchange-server/find-exchange-cmdlet-permissions.md).
31
31
32
32
- To learn about recipient filters in Exchange Online PowerShell, see [Recipient filters in Exchange Management Shell and Exchange Online PowerShell commands](../exchange-server/recipient-filters/recipient-filters.md).
0 commit comments