Skip to content

Commit bfe7578

Browse files
authored
Merge pull request MicrosoftDocs#5745 from MicrosoftDocs/Connect-chrisda
Connect-chrisda to Master
2 parents 90752bd + 345b797 commit bfe7578

File tree

4 files changed

+310
-0
lines changed

4 files changed

+310
-0
lines changed
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
---
2+
external help file: ExchangeOnlineManagement-help.xml
3+
Module Name: ExchangeOnlineManagement
4+
online version: https://docs.microsoft.com/powershell/module/exchange/connect-ippssession
5+
applicable: Exchange Online
6+
title: Connect-IPPSSession
7+
schema: 2.0.0
8+
author: chrisda
9+
ms.author: chrisda
10+
ms.reviewer: navgupta
11+
monikerRange: "exchonline-ps"
12+
---
13+
14+
# Connect-IPPSSession
15+
16+
## SYNOPSIS
17+
This cmdlet is available only in the Exchange Online PowerShell V2 module. For more information, see [Use the Exchange Online PowerShell V2 module](https://docs.microsoft.com/powershell/exchange/exchange-online/exchange-online-powershell-v2/exchange-online-powershell-v2).
18+
19+
Use the Connect-IPPSSession cmdlet in the Exchange Online PowerShell V2 module to connect to Security & Compliance Center PowerShell or standalone Exchange Online Protection PowerShell.
20+
21+
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://docs.microsoft.com/powershell/exchange/exchange-server/exchange-cmdlet-syntax).
22+
23+
## SYNTAX
24+
25+
```
26+
Connect-IPPSSession [[-ConnectionUri] <String>]
27+
[[-AzureADAuthorizationEndpointUri] <String>]
28+
[-BypassMailboxAnchoring]
29+
[-Credential <PSCredential>]
30+
[[-DelegatedOrganization] <String>]
31+
[[-PSSessionOption] <PSSessionOption>]
32+
[-UserPrincipalName <String>]
33+
[<CommonParameters>]
34+
```
35+
36+
## DESCRIPTION
37+
This cmdlet allows you to create a remote PowerShell session to Exchange-related PowerShell environments other than Exchange Online PowerShell. For example, Security & Compliance Center PowerShell or standalone Exchange Online Protection PowerShell (for organizations without Exchange Online mailboxes).
38+
39+
## EXAMPLES
40+
41+
### Example 1
42+
```powershell
43+
$UserCredential = Get-Credential
44+
Connect-IPPSSession -Credential $UserCredential
45+
```
46+
47+
This example connects to Security & Compliance Center PowerShell in a Microsoft 365 organization.
48+
49+
The first command gets the user credentials and stores them in the $UserCredential variable.
50+
51+
The second command connects the current PowerShell session using the credentials in the $UserCredential, which isn't MFA enabled. Note that after the second command is complete, the password key in the $UserCredential variable becomes empty.
52+
53+
After the Connect-IPPSSession command is successful, you can run Security & Compliance Center cmdlets.
54+
55+
### Example 2
56+
```powershell
57+
Connect-IPPSSession -Credential (Get-Credential) -ConnectionUri https://ps.protection.outlook.com/powershell-liveid/
58+
```
59+
60+
This example connects to standalone Exchange Online Protection PowerShell in an organization that doesn't have Exchange Online mailboxes.
61+
62+
## PARAMETERS
63+
64+
### -AzureADAuthorizationEndpointUri
65+
The AzureADAuthorizationEndpointUri parameter specifies the Azure AD Authorization endpoint Uri that can issue OAuth2 access tokens.
66+
67+
In Office 365 Germany for Security & Compliance Center PowerShell, use the value <https://login.microsoftonline.de/common> for this parameter.
68+
69+
```yaml
70+
Type: String
71+
Parameter Sets: (All)
72+
Aliases:
73+
74+
Required: False
75+
Position: 1
76+
Default value: None
77+
Accept pipeline input: False
78+
Accept wildcard characters: False
79+
```
80+
81+
### -BypassMailboxAnchoring
82+
The BypassMailboxAnchoring switch bypasses the use of the mailbox anchoring hint. You don't need to specify a value with this switch.
83+
84+
```yaml
85+
Type: SwitchParameter
86+
Parameter Sets: (All)
87+
Aliases:
88+
Applicable: Exchange Online
89+
90+
Required: False
91+
Position: Named
92+
Default value: None
93+
Accept pipeline input: False
94+
Accept wildcard characters: False
95+
```
96+
97+
### -ConnectionUri
98+
The ConnectionUri parameter specifies the connection endpoint for the remote PowerShell session.
99+
100+
In standalone Exchange Online Protection organizations without Exchange Online mailboxes, use the value <https://ps.protection.outlook.com/powershell-liveid/> for this parameter.
101+
102+
In Office 365 Germany for Security & Compliance Center PowerShell, use the value <https://ps.compliance.protection.outlook.de/PowerShell-LiveID> for this parameter.
103+
104+
```yaml
105+
Type: String
106+
Parameter Sets: (All)
107+
Aliases:
108+
Applicable: Exchange Online
109+
110+
Required: False
111+
Position: 0
112+
Default value: None
113+
Accept pipeline input: False
114+
Accept wildcard characters: False
115+
```
116+
117+
### -Credential
118+
The Credential parameter specifies the username and password that's used to run this command. Typically, you use this parameter in scripts or when you need to provide different credentials that have the required permissions.
119+
120+
A value for this parameter requires the Get-Credential cmdlet. To pause this command and receive a prompt for credentials, use the value `(Get-Credential)`. Or, before you run this command, store the credentials in a variable (for example, `$cred = Get-Credential`) and then use the variable name (`$cred`) for this parameter. For more information, see [Get-Credential](https://go.microsoft.com/fwlink/p/?linkId=142122).
121+
122+
```yaml
123+
Type: PSCredential
124+
Parameter Sets: (All)
125+
Aliases:
126+
Applicable: Exchange Online
127+
128+
Required: False
129+
Position: Named
130+
Default value: None
131+
Accept pipeline input: False
132+
Accept wildcard characters: False
133+
```
134+
135+
### -DelegatedOrganization
136+
The DelegatedOrganization parameter specifies the customer organization that you want to manage (for example, contosoelectronics.onmicrosoft.com). This parameter only works if the customer organization has agreed to your delegated management via the CSP program.
137+
138+
After you successfully authenticate, the cmdlets in this session are mapped to the customer organization, and all operations in this session are done on the customer organization.
139+
140+
```yaml
141+
Type: String
142+
Parameter Sets: (All)
143+
Aliases:
144+
Applicable: Exchange Online
145+
146+
Required: False
147+
Position: 2
148+
Default value: None
149+
Accept pipeline input: False
150+
Accept wildcard characters: False
151+
```
152+
153+
### -PSSessionOption
154+
The PSSessionOption parameter specifies the PowerShell session options to use in your connection to Exchange Online. You store the output of the [New-PSSessionOption](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/new-pssessionoption) command in a variable, for example:
155+
156+
`$Options = New-PSSessionOption <Settings>`
157+
158+
And you use the variable name as the value for this parameter (for example, $Options).
159+
160+
```yaml
161+
Type: PSSessionOption
162+
Parameter Sets: (All)
163+
Aliases:
164+
Applicable: Exchange Online
165+
166+
Required: False
167+
Position: 3
168+
Default value: None
169+
Accept pipeline input: False
170+
Accept wildcard characters: False
171+
```
172+
173+
### -UserPrincipalName
174+
The UserPrincipalName parameter specifies the account that you want to use to connect (for example, [email protected]). Using this parameter allows you to skip the first screen in authentication prompt.
175+
176+
```yaml
177+
Type: String
178+
Parameter Sets: (All)
179+
Aliases:
180+
Applicable: Exchange Online
181+
182+
Required: False
183+
Position: Named
184+
Default value: None
185+
Accept pipeline input: False
186+
Accept wildcard characters: False
187+
```
188+
189+
### CommonParameters
190+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/p/?LinkID=113216).
191+
192+
## INPUTS
193+
194+
###
195+
196+
## OUTPUTS
197+
198+
###
199+
200+
## NOTES
201+
202+
## RELATED LINKS
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
external help file: ExchangeOnlineManagement-help.xml
3+
Module Name: ExchangeOnlineManagement
4+
online version: https://docs.microsoft.com/powershell/module/exchange/disconnect-exchangeonline
5+
applicable: Exchange Online
6+
title: Disconnect-ExchangeOnline
7+
schema: 2.0.0
8+
author: chrisda
9+
ms.author: chrisda
10+
ms.reviewer: navgupta
11+
monikerRange: "exchonline-ps"
12+
---
13+
14+
15+
# Disconnect-ExchangeOnline
16+
17+
## SYNOPSIS
18+
This cmdlet is available only in the Exchange Online PowerShell V2 module. For more information, see [Use the Exchange Online PowerShell V2 module](https://docs.microsoft.com/powershell/exchange/exchange-online/exchange-online-powershell-v2/exchange-online-powershell-v2).
19+
20+
Use the Disconnect-ExchangeOnline cmdlet in the Exchange Online PowerShell V2 module to disconnect from an Exchange Online organization.
21+
22+
For information about the parameter sets in the Syntax section below, see [Exchange cmdlet syntax](https://docs.microsoft.com/powershell/exchange/exchange-server/exchange-cmdlet-syntax).
23+
24+
## SYNTAX
25+
26+
```
27+
Disconnect-ExchangeOnline [-Confirm] [-WhatIf] [<CommonParameters>]
28+
```
29+
30+
## DESCRIPTION
31+
The Connect-ExchangeOnline cmdlet establishes a connection to the Exchage Online organization of the logged-in admin user. This cmdlet is the counterpart to Connect-ExchangeOnline.
32+
33+
Disconnect-ExchangeOnline closes any active session and clears cache. After a successful disconnect, you can't run any of the V2 cmdlets or older remote PowerShell cmdlets.
34+
35+
## EXAMPLES
36+
37+
### Example 1
38+
```powershell
39+
Disconnect-ExchangeOnline
40+
```
41+
This example asks for confirmation before disconnecting the current PowerShell session with Exchange Online.
42+
43+
44+
### Example 2
45+
```powershell
46+
Disconnect-ExchangeOnline -Confirm:$false
47+
```
48+
This example disconnects the current PowerShell session with Exchange Online silently and without a confirmation prompt.
49+
50+
51+
## PARAMETERS
52+
53+
### -Confirm
54+
The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.
55+
56+
- Destructive cmdlets (for example, Remove-\* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.
57+
58+
- Most other cmdlets (for example, New-\* and Set-\* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.
59+
60+
```yaml
61+
Type: SwitchParameter
62+
Parameter Sets: (All)
63+
Aliases: cf
64+
Applicable: Exchange Online
65+
66+
Required: False
67+
Position: Named
68+
Default value: None
69+
Accept pipeline input: False
70+
Accept wildcard characters: False
71+
```
72+
73+
### -WhatIf
74+
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.
75+
76+
```yaml
77+
Type: SwitchParameter
78+
Parameter Sets: (All)
79+
Aliases: wi
80+
Applicable: Exchange Online
81+
82+
Required: False
83+
Position: Named
84+
Default value: None
85+
Accept pipeline input: False
86+
Accept wildcard characters: False
87+
```
88+
89+
### CommonParameters
90+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/p/?LinkID=113216).
91+
92+
## INPUTS
93+
94+
###
95+
96+
## OUTPUTS
97+
98+
###
99+
100+
## NOTES
101+
102+
## RELATED LINKS

exchange/exchange-ps/exchange/exchange.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,6 +2011,10 @@ Exchange PowerShell is built on Windows PowerShell technology and provides a pow
20112011
## powershell-v2-module Cmdlets
20122012
### [Connect-ExchangeOnline](Connect-ExchangeOnline.md)
20132013

2014+
### [Connect-IPPSSession](Connect-IPPSSession.md)
2015+
2016+
### [Disconnect-ExchangeOnline](Disconnect-ExchangeOnline.md)
2017+
20142018
### [Get-EXOCasMailbox](Get-EXOCasMailbox.md)
20152019

20162020
### [Get-EXOMailbox](Get-EXOMailbox.md)

exchange/mapping/serviceMapping.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -986,6 +986,8 @@
986986
"Stop-ManagedFolderAssistant": "policy-and-compliance-retention",
987987
"Validate-RetentionRuleQuery": "policy-and-compliance-retention",
988988
"Connect-ExchangeOnline": "powershell-v2-module",
989+
"Connect-IPPSSession": "powershell-v2-module",
990+
"Disconnect-ExchangeOnline": "powershell-v2-module",
989991
"Get-EXOCasMailbox": "powershell-v2-module",
990992
"Get-EXOMailbox": "powershell-v2-module",
991993
"Get-EXOMailboxFolderPermission": "powershell-v2-module",

0 commit comments

Comments
 (0)