Skip to content

Commit f701c7b

Browse files
authored
Merge branch 'master' into patch-230
2 parents 1d7f5c6 + b3e316f commit f701c7b

File tree

1,494 files changed

+776332
-7923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,494 files changed

+776332
-7923
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ A repository to hold the help reference content for Office PowerShell cmdlets. T
88
Anyone who is interested can contribute to the Microsoft Office PowerShell reference topics.
99
When you contribute your work will go directly into the Microsoft Office products and show up in Get-Help for the given Office cmdlet.
1010

11+
> Notice that if you are looking into contributing for the **PnP PowerShell cmdlets**, their documentation is automatically generated from the code and you should be submitting your change towards the original code at https://github.com/SharePoint/PnP-powershell. See for example how the attributes are used in the code for the [Get-PnPList](https://github.com/SharePoint/PnP-PowerShell/blob/master/Commands/Lists/GetList.cs) cmdlet.
12+
1113
# Quick Start
1214

1315
## Contribute using the GitHub website
@@ -22,15 +24,18 @@ When you contribute your work will go directly into the Microsoft Office product
2224
4. Your browser will then open the file in an edit window. We want to add a link so we scroll down to the Related Links section and add the link in the correct format.
2325
![Image of Edit button on Github](images/add_related_link.png)
2426

25-
**Note** that since you are likely not a maintainer of the Git repository GitHub will automatically 'Fork' the project into your personal GitHub account. A fork is just an exact copy of the repository in your own account so that you have total access to make edits. You are now 'editing' a copy of the project in your own GitHub account. You can always find it again by looking at your GitHub Repositories in your GitHub Profile (drop-down from your name in top right).
27+
**Note** Since you are likely not a maintainer of the Git repository GitHub will automatically 'Fork' the project into your personal GitHub account. A fork is just an exact copy of the repository in your own account so that you have total access to make edits. You are now 'editing' a copy of the project in your own GitHub account. You can always find it again by looking at your GitHub Repositories in your GitHub Profile (drop-down from your name in top right).
2628
![Image of Automatic Fork message on Github](images/auto_fork.png)
2729

2830
5. You can click the Preview changes link to see what the changes will look like.
2931

3032
**IMPORTANT** The layout of headings and subheadings must follow a very specific schema that is required for PowerShell Get-Help.
3133
Any deviation will throw errors in the Pull Request. The schema can be found here: https://github.com/PowerShell/platyPS/blob/master/platyPS.schema.md
32-
6. Once you are satisified with your work you submit a Pull Request which asks the maintainer of the main repository (known as Upstream) to pull your edits up. To submit a Pull Request you navigate back to the main repository, https://github.com/microsoftdocs/office-docs-powershell, and click the '''New pull request''' button. You will then request your edits to be pulled up into the main repo. Make sure to click the **compare across forks** link since you are request a pull from the edits you made that reside in your own personal repsitory. To learn more about pull requests and forking, see https://help.github.com/articles/creating-a-pull-request-from-a-fork/.
3334

35+
6. Once you are satisified with your work, go to the **Propose file change** area at the bottom of the topic. Enter a title title and other description informaton and then click **Propose file change**.
36+
![Image of Propose file change on Github](images/propose_file_change.png)
37+
38+
7. On the next screen, click **Create pull request**.
3439

3540
Looking for more in-depth content? Check out the following:
3641
* [Frequently Asked Questions (FAQ)](repo_docs/FAQ.md)

exchange/docfx.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"**/*.png",
4040
"**/*.jpg"
4141
],
42+
"version": "exchange-ps",
4243
"exclude": [
4344
"**/obj/**",
4445
"**/includes/**"
@@ -68,4 +69,4 @@
6869
"template": [],
6970
"dest": "exchange-ps"
7071
}
71-
}
72+
}
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: "Connect to Exchange Online Protection PowerShell"
3+
ms.author: chrisda
4+
author: chrisda
5+
manager: serdars
6+
ms.date: 7/10/2017
7+
ms.audience: Admin
8+
ms.topic: article
9+
ms.service: eop
10+
localization_priority: Normal
11+
ms.assetid: 054e0fd7-d465-4572-93f8-a00a9136e4d1
12+
description: "Use remote PowerShell to connect to an Exchange Online Protection organization"
13+
---
14+
15+
# Connect to Exchange Online Protection PowerShell
16+
17+
Exchange Online Protection PowerShell allows you to manage your Exchange Online Protection settings from the command line. You use Windows PowerShell on your local computer to create a remote PowerShell session to Exchange Online Protection. 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 Protection cmdlets into your local Windows PowerShell session so that you can use them.
18+
19+
## What do you need to know before you begin?
20+
21+
- Estimated time to complete: 5 minutes
22+
23+
- You can use the following versions of Windows:
24+
25+
- Windows 10
26+
27+
- Windows 8.1
28+
29+
- Windows Server 2016
30+
31+
- Windows Server 2012 or Windows Server 2012 R2
32+
33+
- Windows 7 Service Pack 1 (SP1)\*
34+
35+
- Windows Server 2008 R2 SP1\*
36+
37+
\* You need to install the Microsoft.NET Framework 4.5 or later and then either the Windows Management Framework 3.0 or the Windows Management Framework 4.0. For more information, see [Installing the .NET Framework](https://go.microsoft.com/fwlink/p/?LinkId=257868) and [Windows Management Framework 3.0](https://go.microsoft.com/fwlink/p/?LinkId=272757) or [Windows Management Framework 4.0](https://go.microsoft.com/fwlink/p/?LinkId=391344).
38+
39+
- Windows PowerShell needs to be configured to run scripts, and by default, it isn't. You get the following error when you try to connect:
40+
41+
`Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.`
42+
43+
To enable Windows PowerShell to run signed scripts, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you open by selecting **Run as administrator**):
44+
45+
```
46+
Set-ExecutionPolicy RemoteSigned
47+
```
48+
49+
You need to configure this setting only once on your computer, not every time you connect.
50+
51+
> [!TIP]
52+
> Having problems? Ask for help in the Exchange forums. Visit the forums at: [Exchange Server](https://go.microsoft.com/fwlink/p/?linkId=60612), [Exchange Online](https://go.microsoft.com/fwlink/p/?linkId=267542), or [Exchange Online Protection](https://go.microsoft.com/fwlink/p/?linkId=285351).
53+
54+
## Connect to Exchange Online Protection
55+
56+
1. On your local computer, open Windows PowerShell and run the following command.
57+
58+
```
59+
$UserCredential = Get-Credential
60+
```
61+
62+
In the **Windows PowerShell Credential Request** dialog box, type your work or school account and password, and then click **OK**.
63+
64+
2. Run the following command.
65+
66+
```
67+
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.protection.outlook.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
68+
```
69+
70+
**Notes**:
71+
72+
- For Office 365 Germany, use the _ConnectionUri_ value: `https://ps.protection.outlook.de/powershell-liveid/`
73+
74+
- For Exchange Online Protection subscriptions that are Exchange Enterprise CAL with Services (includes data loss prevention (DLP) and reporting using web services), use the _ConnectionUri_ value: `https://outlook.office365.com/powershell-liveid/`
75+
76+
3. Run the following command.
77+
78+
```
79+
Import-PSSession $Session
80+
```
81+
82+
[!NOTE]
83+
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:
84+
85+
```
86+
Remove-PSSession $Session
87+
```
88+
89+
## How do you know this worked?
90+
91+
After Step 3, the Exchange Online Protection cmdlets are imported into your local Windows PowerShell session and tracked by a progress bar. If you don't receive any errors, you connected successfully. A quick test is to run an Exchange Online Protection cmdlet, for example, **Get-TransportRule**, and see the results.
92+
93+
If you receive errors, check the following requirements:
94+
95+
- A common problem is an incorrect password. Run the three steps again and pay close attention to the user name and password you enter in Step 1.
96+
97+
- To help prevent denial-of-service (DoS) attacks, you're limited to three open remote PowerShell connections to your Exchange Online Protection organization.
98+
99+
- TCP port 80 traffic needs to be open between your local computer and Office 365. It's probably open, but it's something to consider if your organization has a restrictive Internet access policy.
100+
101+
## See also
102+
103+
The cmdlets that you use in this topic are Windows PowerShell cmdlets. For more information about these cmdlets, see the following topics.
104+
105+
- [Get-Credential](https://go.microsoft.com/fwlink/p/?LinkId=389618)
106+
107+
- [New-PSSession](https://go.microsoft.com/fwlink/p/?LinkId=389621)
108+
109+
- [Import-PSSession](https://go.microsoft.com/fwlink/p/?LinkId=389619)
110+
111+
- [Remove-PSSession](https://go.microsoft.com/fwlink/p/?LinkId=389620)
112+
113+
- [Set-ExecutionPolicy](https://go.microsoft.com/fwlink/p/?LinkId=389623)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: "Exchange Online Protection PowerShell"
3+
ms.author: chrisda
4+
author: chrisda
5+
manager: serdars
6+
ms.date: 2/20/2018
7+
ms.audience: Admin
8+
ms.topic: article
9+
ms.service: eop
10+
localization_priority: Normal
11+
ms.assetid: f7918a88-774a-405e-945b-bc2f5ee9f748
12+
description: "Learn about using PowerShell in Exchange Online Protection"
13+
---
14+
15+
# Exchange Online Protection PowerShell
16+
17+
Exchange Online Protection PowerShell is the administrative interface that enables you to manage your Exchange Online Protection (EOP) organization from the command line. For example, you can use Exchange Online Protection PowerShell to configure mail flow rules (also known as transport rules) and connectors. The following topics provide information about using Exchange Online Protection PowerShell:
18+
19+
- To create a remote PowerShell session to your Exchange Online Protection organization, see [Connect to Exchange Online Protection PowerShell](connect-to-exchange-online-protection-powershell.md).
20+
21+
- For a sample script that lets admins who manage multiple tenants (companies) apply configuration settings to their tenants, see [Sample script for applying EOP settings to multiple tenants](http://technet.microsoft.com/library/e87e84e1-7be0-44bf-a414-d91d60ed8817.aspx).
22+
23+
- The following introductory video shows you how to connect to and use Exchange Online Protection PowerShell.
24+
25+
**Note:** This video applies to Exchange Online and 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.
26+
27+
[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)
28+
29+
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: "Connect to Exchange Online PowerShell"
3+
ms.author: chrisda
4+
author: chrisda
5+
manager: serdars
6+
ms.date: 7/10/2017
7+
ms.audience: Admin
8+
ms.topic: article
9+
ms.service: exchange-online
10+
localization_priority: Normal
11+
ms.custom: Strat_EX_Admin
12+
ms.assetid: c8bea338-6c1a-4bdf-8de0-7895d427ee5b
13+
description: "Learn how to use remote PowerShell to connect to Exchange Online."
14+
---
15+
16+
# Connect to Exchange Online PowerShell
17+
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.
18+
19+
> [!IMPORTANT]
20+
> 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). 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.
21+
22+
## What do you need to know before you begin?
23+
24+
- Estimated time to complete: 5 minutes
25+
26+
- You can use the following versions of Windows:
27+
28+
- Windows 10
29+
30+
- Windows 8.1
31+
32+
- Windows Server 2016
33+
34+
- Windows Server 2012 or Windows Server 2012 R2
35+
36+
- Windows 7 Service Pack 1 (SP1)\*
37+
38+
- Windows Server 2008 R2 SP1\*
39+
40+
\* You need to install the Microsoft.NET Framework 4.5 or later and then either the Windows Management Framework 3.0 or the Windows Management Framework 4.0. For more information, see [Installing the .NET Framework](https://go.microsoft.com/fwlink/p/?LinkId=257868) and[Windows Management Framework 3.0](https://go.microsoft.com/fwlink/p/?LinkId=272757) or[Windows Management Framework 4.0](https://go.microsoft.com/fwlink/p/?LinkId=391344).
41+
42+
- Windows PowerShell needs to be configured to run scripts, and by default, it isn't. You get the following error when you try to connect:
43+
44+
`Files cannot be loaded because running scripts is disabled on this system. Provide a valid certificate with which to sign the files.`
45+
46+
To enable Windows PowerShell to run signed scripts, run the following command in an elevated Windows PowerShell window (a Windows PowerShell window you open by selecting **Run as administrator**):
47+
48+
```
49+
Set-ExecutionPolicy RemoteSigned
50+
```
51+
52+
You need to configure this setting only once on your computer, not every time you connect.
53+
54+
55+
> [!TIP]
56+
> 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).
57+
58+
## Connect to Exchange Online PowerShell
59+
60+
1. On your local computer, open Windows PowerShell and run the following command.
61+
62+
```
63+
$UserCredential = Get-Credential
64+
```
65+
In the **Windows PowerShell Credential Request** dialog box, type your work or school account and password, and then click **OK**.
66+
67+
2. Run the following command.
68+
69+
```
70+
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
71+
```
72+
73+
**Notes**:
74+
75+
- For Office 365 operated by 21Vianet, use the _ConnectionUri_ value: `https://partner.outlook.cn/PowerShell`
76+
77+
- For Office 365 Germany, use the _ConnectionUri_ value: `https://outlook.office.de/powershell-liveid/`
78+
79+
3. Run the following command.
80+
81+
```
82+
Import-PSSession $Session
83+
```
84+
85+
> [!NOTE]
86+
> 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.
87+
88+
```
89+
Remove-PSSession $Session
90+
```
91+
92+
## How do you know this worked?
93+
94+
After Step 3, the Exchange Online cmdlets are imported into your local Windows PowerShell session and tracked by a progress bar. If you don't receive any errors, you connected successfully. A quick test is to run an Exchange Online cmdlet, for example, **Get-Mailbox**, and see the results.
95+
96+
If you receive errors, check the following requirements:
97+
98+
- A common problem is an incorrect password. Run the three steps again and pay close attention to the user name and password you enter in Step 1.
99+
100+
- To help prevent denial-of-service (DoS) attacks, you're limited to three open remote PowerShell connections to your Exchange Online organization.
101+
102+
- The account you use to connect to Exchange Online must be enabled for remote PowerShell. For more information, see [Enable or disable access to Exchange Online PowerShell](../disable-access-to-exchange-online-powershell.md).
103+
104+
- TCP port 80 traffic needs to be open between your local computer and Office 365. It's probably open, but it's something to consider if your organization has a restrictive Internet access policy.
105+
106+
## See also
107+
108+
The cmdlets that you use in this topic are Windows PowerShell cmdlets. For more information about these cmdlets, see the following topics.
109+
110+
- [Get-Credential](https://go.microsoft.com/fwlink/p/?LinkId=389618)
111+
112+
- [New-PSSession](https://go.microsoft.com/fwlink/p/?LinkId=389621)
113+
114+
- [Import-PSSession](https://go.microsoft.com/fwlink/p/?LinkId=389619)
115+
116+
- [Remove-PSSession](https://go.microsoft.com/fwlink/p/?LinkId=389620)
117+
118+
- [Set-ExecutionPolicy](https://go.microsoft.com/fwlink/p/?LinkId=389623)
119+
120+

0 commit comments

Comments
 (0)