Skip to content

Commit cb30cd9

Browse files
committed
Update Get-MailboxLocation.md
Semi-related to Issue #3498
1 parent 7135c23 commit cb30cd9

File tree

1 file changed

+90
-16
lines changed

1 file changed

+90
-16
lines changed

exchange/exchange-ps/exchange/mailboxes/Get-MailboxLocation.md

Lines changed: 90 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,39 @@ monikerRange: "exchonline-ps"
1212
# Get-MailboxLocation
1313

1414
## SYNOPSIS
15-
This cmdlet is available only in the cloud-based service.
15+
This cmdlet is available in on-premises Exchange and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.
1616

1717
Use the Get-MailboxLocation cmdlet to view mailbox location information in Exchange Online.
1818

1919
For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax (https://technet.microsoft.com/library/bb123552.aspx).
2020

2121
## SYNTAX
2222

23+
### DatabaseSet
24+
```
25+
Get-MailboxLocation -Database <DatabaseIdParameter>
26+
[-Confirm]
27+
[-MailboxLocationType <MailboxLocationType>]
28+
[-ResultSize <Unlimited>]
29+
[-WhatIf] [<CommonParameters>]
30+
```
31+
2332
### Identity
2433
```
25-
Get-MailboxLocation -Identity <MailboxLocationIdParameter> [-Confirm]
26-
[-MailboxLocationType <Primary | MainArchive | AuxArchive | Aggregated | AuxPrimary | ComponentShared>]
27-
[-ResultSize <Unlimited>] [-WhatIf] [<CommonParameters>]
34+
Get-MailboxLocation -Identity <MailboxLocationIdParameter>
35+
[-Confirm]
36+
[-MailboxLocationType <MailboxLocationType>]
37+
[-ResultSize <Unlimited>]
38+
[-WhatIf] [<CommonParameters>]
2839
```
2940

3041
### User
3142
```
32-
Get-MailboxLocation -User <UserIdParameter> [-Confirm]
33-
[-MailboxLocationType <Primary | MainArchive | AuxArchive | Aggregated | AuxPrimary | ComponentShared>]
34-
[-ResultSize <Unlimited>] [-WhatIf] [<CommonParameters>]
43+
Get-MailboxLocation -User <UserIdParameter> [-IncludePreviousPrimary]
44+
[-Confirm]
45+
[-MailboxLocationType <MailboxLocationType>]
46+
[-ResultSize <Unlimited>]
47+
[-WhatIf] [<CommonParameters>]
3548
```
3649

3750
## DESCRIPTION
@@ -44,20 +57,60 @@ You need to be assigned permissions before you can run this cmdlet. Although thi
4457
Get-MailboxLocation -User [email protected]
4558
```
4659

47-
This example returns the mailbox location for the user [email protected].
60+
In Exchange Online, this example returns the mailbox location information for the user [email protected].
61+
62+
### -------------------------- Example 2 --------------------------
63+
```
64+
Get-MailboxLocation -Identity e15664af-82ed-4635-b02a-df7c2e03d950
65+
```
66+
67+
In Exchange Server or Exchange Online, this example returns the mailbox location information for the specified mailbox GUID (the ExchangeGuid property value from the results of Get-Mailbox -Identity \<MailboxIdentity\> | Format-List ExchangeGuid).
4868

4969
## PARAMETERS
5070

71+
### -Database
72+
This parameter is available only in on-premises Exchange.
73+
74+
The Database parameter returns the mailbox location information for all mailboxes on the specified mailbox database. You can use any value that uniquely identifies the database. For example:
75+
76+
- Name
77+
78+
- Distinguished name (DN)
79+
80+
- GUID
81+
82+
You can't use this parameter with the Identity parameter.
83+
84+
```yaml
85+
Type: DatabaseIdParameter
86+
Parameter Sets: DatabaseSet
87+
Aliases:
88+
Applicable: Exchange Server 2016, Exchange Server 2019
89+
Required: True
90+
Position: Named
91+
Default value: None
92+
Accept pipeline input: False
93+
Accept wildcard characters: False
94+
```
95+
5196
### -Identity
52-
The Identity parameter specifies the mailbox location object that you want to view. The value uses the syntax \<GUID1\>\\\<GUID2\>. Typically, you can only find this value after you run Get-MailboxLocation with the User parameter.
97+
The Identity parameter specifies the mailbox location object that you want to view. The value uses the either of the following formats:
98+
99+
- \<TenantGUID\>\\\<MailboxGUID\>
100+
101+
- \<MailboxGUID\>
102+
103+
In Exchange Server or Exchange Online, you can run the following command to find and compare the \<MailboxGUID\> values for the user: Get-Mailbox -Identity \<MailboxIdentity\> \| Format-List *GUID,MailboxLocations.
104+
105+
In Exchange Online, you can find the \<TenantGUID\> and \<MailboxGUID\> values after you run Get-MailboxLocation with the User parameter.
53106
54107
You can't use this parameter with the User parameter.
55108
56109
```yaml
57110
Type: MailboxLocationIdParameter
58111
Parameter Sets: Identity
59112
Aliases:
60-
Applicable: Exchange Online
113+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
61114
Required: True
62115
Position: Named
63116
Default value: None
@@ -66,6 +119,8 @@ Accept wildcard characters: False
66119
```
67120
68121
### -User
122+
This parameter is available only in the cloud-based service.
123+
69124
The User parameter specifies the user whose mailbox location you want to view. You can use any value that uniquely identifies the user. For example:
70125
71126
- Name
@@ -101,6 +156,25 @@ The Confirm switch specifies whether to show or hide the confirmation prompt. Ho
101156
Type: SwitchParameter
102157
Parameter Sets: (All)
103158
Aliases: cf
159+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
160+
Required: False
161+
Position: Named
162+
Default value: None
163+
Accept pipeline input: False
164+
Accept wildcard characters: False
165+
```
166+
167+
### -IncludePreviousPrimary
168+
This parameter is available only in the cloud-based service.
169+
170+
The IncludePreviousPrimary switch specifies whether to include the previous primary mailbox in the results. You don't need to specify a value with this switch.
171+
172+
You can only use this switch with the User parameter.
173+
174+
```yaml
175+
Type: SwitchParameter
176+
Parameter Sets: User
177+
Aliases:
104178
Applicable: Exchange Online
105179
Required: False
106180
Position: Named
@@ -122,15 +196,15 @@ The MailboxLocationType filters the results by the type of mailbox. Valid values
122196
123197
- MainArchive
124198
125-
- Primary
199+
- PreviousPrimary (Exchange Online only)
126200
127-
- RemotePrimary
201+
- Primary
128202
129203
```yaml
130-
Type: Primary | MainArchive | AuxArchive | Aggregated | AuxPrimary | ComponentShared
204+
Type: MailboxLocationType
131205
Parameter Sets: (All)
132206
Aliases:
133-
Applicable: Exchange Online
207+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
134208
Required: False
135209
Position: Named
136210
Default value: None
@@ -145,7 +219,7 @@ The ResultSize parameter specifies the maximum number of results to return. If y
145219
Type: Unlimited
146220
Parameter Sets: (All)
147221
Aliases:
148-
Applicable: Exchange Online
222+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
149223
Required: False
150224
Position: Named
151225
Default value: None
@@ -160,7 +234,7 @@ The WhatIf switch simulates the actions of the command. You can use this switch
160234
Type: SwitchParameter
161235
Parameter Sets: (All)
162236
Aliases: wi
163-
Applicable: Exchange Online
237+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
164238
Required: False
165239
Position: Named
166240
Default value: None

0 commit comments

Comments
 (0)