Sunday, February 19, 2012

Storage Groups & store in Exchange 2007

After launching the Exchange Management Console and looking around, you may find it quicker and easier to type a few PowerShell commands rather than keep drilling down via the GUI.  Here are a few of the many PowerShell commands to configure your Exchange 2007 stores and storage groups.
mount-Database  
Example: Mount-Database -Identity ExchSrv\MgrDatabase  There is also a sister command: dismount-Database.
remove-MailboxDatabase
Example: remove-MailboxDatabase -Identity "OldMgrs"
set-MailboxDatabase  This is the command to set mailbox limits.
Example: Set-MailboxDatabase "db1" -IssueWarningQuota 512000000 -ProhibitSendQuota 563200000 -ProhibitSendReceiveQuota 614400000
set-MailboxDatabase has more parameters, for example, you can 'wire up' email journaling.  There is also a family of MailboxPermission commands, which use the verbs add, get or remove. 
Statistics
Two more interesting cmdlets are: get-MailboxFolderStatistics and also get-MailboxStatistics. 
move-DatabasePath  This command requires more parameters, I would favour the GUI unless you are for ever moving mailstore databases.

Allowing a user to get access to the Resource mailbox

After creation and validation of the resource mailbox, we can add permission for a specific user to control the Resource Mailbox. We can do that using the cmdlet called Add-MailboxPermission (Figure 12), with the following parameters:
Add-MailboxPermission –Identity <Resource-Mailbox> -User <user> -AccessRights <Access Allowed> -InheritanceType <Inheritance’s Type>
Now, the user specified in the Add-MailboxPermission cmdlet can access the Resource Mailbox. We can accomplish this using an OWA session. Open OWA using the credentials that have access to the Resource mailbox, and then click on the name of the logged user in the upper-right side of OWA and type in the name of the Resource Mailbox and click Open,
After that, a new window will appear with an OWA session of the specified Resource Mailbox and then we can configure the resource mailbox features of this account 

Converting a mailbox to Resource mailbox

Ok, let’s suppose that we have created a regular mailbox instead of a resource mailbox. Should we delete and start the process over again? No, it is not necessary; we can convert from a Regular Mailbox to a Resource mailbox or vice-versa:
1.     Let’s make sure that the mailbox (meeting.room.quebec) is not a resource.
Get-Mailbox <Mailbox> | select Name,IsResource
2.     Ok, someone created that mailbox as a Regular mailbox, let’s convert it to a Resource mailbox.
Set-Mailbox <Mailbox to be converted> -Type Room
3.     Now, let’s validate our conversion using the first cmdlet (step 1).
PS:\>set-mailbox user1 -type room
convert in normal user mailbox
PS:\>set-mailbox user1 -type regular
 To use the Exchange Management Shell to enable automatic booking on a resource mailbox
  • Run the following command:
Set-MailboxCalendarSettings <Identity> -AutomateProcessing:AutoAccept
  To use the Exchange Management Shell to disable automatic booking on a resource mailbox
  • Run the following command:
Set-MailboxCalendarSettings <Identity> -AutomateProcessing:None

To use the Exchange Management Console to configure the deleted mailbox retention period
1.     Open the Exchange Management Console.
2.     In the Console Tree, expand Microsoft Exchange, then expand Server Configuration, and then select Mailbox.
3.     On the Database Management tab in the work pane, expand the storage group that contains the mailbox database that you want to configure.
4.     Right-click the database that you want to configure, and then select Properties.
5.     Click the Limits tab.
6.     In the Deletion settings area, enter the number of days to retain deleted mailboxes in Keep deleted mailboxes for (days).
7.     Click OK to save the changes.
  To use the Exchange Management Shell to configure the deleted mailbox retention period
1.     Open the Exchange Management Shell.
2.                 Run the following command:
Set-MailboxDatabase <database_name> -MailboxRetention 45.00:00:00

To recover a deleted mailbox using the Exchange Management Console
1.     Start the Exchange Management Console.
2.     In the console tree, expand Recipient Configuration.
3.     In the console tree, click Disconnected Mailbox.
4.     In the action pane, click Connect to Server to list all the disconnected mailboxes on a given server. In the Connect to Server dialog box, enter the name of the server that you want, and then click Connect.

If you want to set the server as the default, select the Set as Default Server check box.

5.     Follow the steps in the Connect Mailbox wizard to reconnect the disconnected mailbox.
  To recover a deleted mailbox using the Exchange Management Shell
1.     To find disconnected mailboxes, run the following Exchange Management Shell command:
Get-MailboxStatistics -Server <server> | where { $_.DisconnectDate -ne $null } | select DisplayName,DisconnectDate
2.     To reconnect a disconnected mailbox where the user object is still in Active Directory directory service, run the following Exchange Management Shell command:
Connect-Mailbox -Database <Mailbox_database > -Identity <Deleted_Mailbox>

No comments: