Export-CSV
Can be used to output a CSV file from report style cmdlets.
get-mailbox | get-mailboxstatistics | export-csv -path w:\exchangeusers.csv
Mail Enable an AD User
[PS] C:\Documents and Settings\waknowles>Enable-Mailbox -Identity "user@domain" -Database "First Storage Group\Mailbox
Database"
[PS] C:\Documents and Settings\waknowles>set-mailbox -identity user -emailaddresses user@domain,user.alias@domain
Set-Mailbox cmdlet
Enable-Mailbox cmdlet
Adding a mail contact
Creates an Exchange 2007 mail contact. Note you cannot create mail contacts in Active Directory, and this method is obviously alot faster as you can create many contacts in a batch.
New-MailContact -Name "support" -ExternalEmailAddress alias@domain -OrganizationalUnit "domain/Mail Contacts"
New-MailContact cmdlet
Mailbox Size Report
get-mailbox | get-mailboxstatistics | select-object DisplayName,TotalItemSize,StorageLimitStatus,LastLogonTime
Generating a mailbox size report
Cleaning up mailboxes
When you remove a mailbox from Microsoft Exchange Server, it does not automatically hard delete the mailbox. Hard deletion may be required to free up disk space, or to remove all traces of the mailbox such that a new mailbox can be created.
The first command will set the retention period on the mailbox database to 1 minute. This doesn’t always remove the mailbox however, especially if a backup has not taken place.
The second command will cleanup the mailbox database specified, removing any mailboxes marked for deletion. The -confirm attribute will remove items regardless of their backup state or retention period.
Check the Application event log afterwards to confirm removal.
[PS] C:\Documents and Settings\waknowles>Set-MailboxDatabase "Mailbox Database" -MailboxRetention 00:00:01
[PS] C:\Documents and Settings\waknowles>Clean-MailboxDatabase "Mailbox Database" -confirm
Confirm
Are you sure you want to perform this action?
Cleaning Mailbox Database "EXCHANGE.server\Mailbox Database".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): a
Cleaning up deleted mailboxes
How to configure deleted mailbox retention
Setting full administrative access on a mailbox
**When to use:** if a user needs to access another user’s mailbox; administrative access for backup/restore/support purposes
**What it does:** gives full access to the user’s mailbox to the user specified.
[PS] C:\Documents and Settings\waknowles>Add-MailboxPermission username -User waknowles -AccessRights FullAccess
Identity User AccessRights IsInherited Deny
-------- ---- ------------ ----------- ----
domain.... DOMAIN\username {FullAccess} False False
Backing up a mailbox
- To backup a mailbox, give full administrative access to the user you will use to perform the backup.
- Add the mailbox to the Exchange account in Outlook
- Export the mailbox (include all subfolders) to a PST file – store in BACKUP2′s mail archive share
Restoring a mailbox
- If doing a complete restore, you will need to disable the mailbox in the Exchange Management Console. This will remove Exchange attributes from the user’s AD account.
- At this point, cleanup the mailbox database using the “Cleaning up Mailboxes” instructions
- Create a new mailbox for the user. Be sure to setup email addresses again.
- Grant full administrative access to the owner of the mailbox and an administrative user.
- Open Outlook on TS and add the mailbox to the Exchange account.
- Navigate the the root of the mailbox and go to File -> Import and Export
- Use the “Import from a file” option to import from the backup PST file. Be sure to import *all* folders. This may take a while.
Cached Outlook Contacts
Outlook caches recently used contacts in c:\documents and settings\username\application data\microsoft\outlook\outlook.nk2
If email bounces back with error messages similar to the following, rename or delete this file and restart Outlook.
USER
The recipient's e-mail address was not found in the recipient's e-mail system. Microsoft Exchange will not try to redeliver this message for you. Please check the e-mail address and try resending this message, or provide the following diagnostic text to your system administrator.
Mailbox offline for single user, but working for others?
Check Application event log for error events with source MSExchangeIS (Event ID: 9646). The error detail should look something like this:
Mapi session "/o=organisation/ou=exchange administrative group (fydibohf23spdlt)/cn=recipients/cn=davidlulham" exceeded the maximum of 32 objects of type "session".
Unfortunately, the only fix for this at the moment is to __restart the MSExchangeIS service__.
Username/Password Prompt After Server Restarted
Start the Microsoft Exchange System Attendant service. This fails to start on boot, and must be started manually.
Useful Links
- Sending mail to a public folder from a non-Windows source
- Generating a mailbox size report
- How to use recovery storage groups
- Upgrading from 2007 Standard to 2007 Enterprise
- Cleaning up deleted mailboxes
- How to configure deleted mailbox retention
- Defragmenting your Exchange database
- The Exchange store is dismounted, and event ID 1159 is logged in Exchange Server 2007
- Exchange log disk is full – Prevention and Remedies
- Performance Counters: ESE Log Generation Checkpoint Depth
- The Exchange “Pickup” Folder
- Importing and Exporting from PST files
- Your Exchange Server 2003 computer may stop responding after a MAPI client opens more than the default value of certain server objects
- How to increase the number of Outlook 2003 clients that your Windows Server 2003 x64-based terminal server can support
- New-MailContact cmdlet
- How to Create a Windows Server 2003 Failover Cluster for Cluster Continuous Replication
- Installing Cluster Continuous Replication on Windows Server 2003
- Excessive paging on Exchange 2007 servers when working sets are trimmed
- Understanding Setup /M:RecoverServer
- Recovery Storage Groups
- How to Restore a Mailbox Database to a New Server with Database Portability
- How to Restore After Database Corruption Occurs
- How to Recover a Lost Exchange Server
- How to Perform a Basic Restore of Exchange Databases
- How to Back Up and Recover a Client Access Server
- How Network Load Balancing Technology Works
- Export-csv cmdlet
- Eseutil
- Dial Tone Recovery
- Disaster Recovery Preocedures
- Clear-ActiveSyncDevice (RTM)