You can also use the whatif
parameter to obtain an explanation of what you are about to do.
In some cases you may want to simply disconnect the mailbox from the associated Active Directory user
account while retaining the user account. This is similar to removing all Exchange attributes as
Part I: PowerShell for Exchange Fundamentals
120
performed in Exchange Server 2000/2003. In this case, use the Disable-Mailbox cmdlet to disconnect
the mailbox. The mailbox will be marked for deletion/removal per the mailbox retention policy.
In Figure 4 - 28 we first obtain a list of disconnected mailboxes on a database on server Ex7B and assign it
to a variable. Notice the mailbox ExTest is a disconnected mailbox. Next we use the Remove-Mailbox
cmdlet to purge the mailboxes from the Exchange database. We confirm the mailbox removal by looking
at the MailboxStatistics again.
$Temp = Get-MailboxStatistics -Database ???Ex7B\Mailbox Database??? | Where
{$_.DisconnectDate -ne $null}
Remove-Mailbox -Database ???Ex7B\Mailbox Database??? -StoreMailboxIdentity
$Temp.MailboxGuid
Figure 4-28
Enabling and Disabling Client - Access Related Attributes
Several client - access attributes can be modified for users on Exchange Server 2007. These include
Outlook Web Access (OWA), ActiveSync, POP3, and IMAP4 attributes.
Pages:
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212