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/exchange-ps/exchange/mailboxes/Get-MailboxLocation.md
+90-16Lines changed: 90 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -12,26 +12,39 @@ monikerRange: "exchonline-ps"
12
12
# Get-MailboxLocation
13
13
14
14
## 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.
16
16
17
17
Use the Get-MailboxLocation cmdlet to view mailbox location information in Exchange Online.
18
18
19
19
For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax (https://technet.microsoft.com/library/bb123552.aspx).
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).
48
68
49
69
## PARAMETERS
50
70
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
+
51
96
### -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.
53
106
54
107
You can't use this parameter with the User parameter.
55
108
56
109
```yaml
57
110
Type: MailboxLocationIdParameter
58
111
Parameter Sets: Identity
59
112
Aliases:
60
-
Applicable: Exchange Online
113
+
Applicable: Exchange Server 2016, Exchange Server 2019, Exchange Online
This parameter is available only in the cloud-based service.
123
+
69
124
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:
70
125
71
126
- Name
@@ -101,6 +156,25 @@ The Confirm switch specifies whether to show or hide the confirmation prompt. Ho
101
156
Type: SwitchParameter
102
157
Parameter Sets: (All)
103
158
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:
104
178
Applicable: Exchange Online
105
179
Required: False
106
180
Position: Named
@@ -122,15 +196,15 @@ The MailboxLocationType filters the results by the type of mailbox. Valid values
0 commit comments