Showing posts with label Exchange 2010. Show all posts
Showing posts with label Exchange 2010. Show all posts

Monday, January 16, 2012

Exchange Maintenance Tasks

There isn't really a lot to be done with Exchange these days. Since the advent of E12, the code name for Exchange 2007, the maintenance task list has shrunk quite a bit.

The items that do need watching are just a subset of the "old days."

  • Maintain your daily backups - probably the most important thing you can do for Exchange

  • Examine your message queues for log jams or stuck messages

  • Check available disk space (but you've already automated this, right?)

  • Examine the event logs for errors and warnings

  • Make sure your anti-malware software is functioning properly, i.e. turned on and getting updates (some people host this service, so that would only leave four items :)


Thanks to Jim McBee for providing guidance in his many excellent books.

Wednesday, January 11, 2012

"Delivery has failed" error When Scheduling a Resource

There are plenty of answers to the error message:

"Delivery has failed to these recipients or distribution lists:
 
Jane Doe
Your message wasn't delivered because of security policies..."

In our case, Jane Doe was no longer an employee and her account was disabled. The sender of the message was requesting a meeting with someone who had Jane as his admin, so he had her as a Delegate for his Calendar. Once we removed her from his Outlook's Delegate list, there were no more errors.

Pretty simple, but they've moved Delegate Access in Outlook 2010, now you go to File > Account Settings > Delegate Access

For Outlook 2007 and earlier, go to Tools > Options > Delegates tab.

Saturday, December 17, 2011

Search Fails for Some Outlook or OWA Users

Due to a recent power outage at a client site, their Exchange search catalogs became corrupted. The issue at hand was that searches in Outlook or OWA only resulted in showing results prior to the outage.

To confirm that this was the case, I opened the trusty EMS and ran this command on an affected individual.

test-exchangesearch username | fl

This result confirmed the catalog corruption:
ResultFound : False
SearchTime : -1


The fix is rather easy, but depending on your database size, can be rather lengthy. The script below stops the Microsoft Exchange Search Indexer, deletes the Catalog of the database in question and restarts the Indexer which fires off a complete rebuild.

You can find the script here (from where it must be run): <drive>:\Program Files\Microsoft\Exchange Server\Scripts

Syntax: ResetSearchIndex.ps1 -force <database>

Example: ResetSearchIndex.ps1 -force "Mailbox One"

The rebuilding of our catalogs took almost an hour for a 80GB database. And that was on a fairly powerful system with 32GB of RAM.

Tuesday, December 13, 2011

Script to Export a Mailbox to PST

With an occasional need to export a user mailbox to PST for archive, I decided it would be useful to be able to call up a script and save myself some time and mouse clicking.

Should you wish to give the script below a try, copy it into a text file and change the extension to .ps1

Note: This script should be run from a system with Outlook and the Exchange Management Tools installed (they both need to be 32 or 64-bit) for this to work).

rem Gathering names for labeling the exported PST
$fname = Read-Host "First name?"
$lname = Read-Host "Last name?"


rem Assigning the current date to the $date variable
$date = get-date -uformat "%Y_%m_%d"


rem Capturing name of mailbox account (assigning to $uname variable)
$uname = Read-Host "Username?"

rem Capturing admin acct that is currently logged in to add mailbox permissions (assigning to $admin variable)
whoami > $admin

rem Adding permissions for admin allowing export
Add-MailboxPermission -AccessRights FullAccess -Identity $uname -User $admin

rem Exporting mailbox to D:\PSTs (change path to your liking)
Export-Mailbox -Identity $uname -PSTFolderPath D:\PSTs\$fname"_"$lname"_"$date.pst

If at some point I get time or get paid to do so, I'll make a script to allow the use of a list for mass export.

Wednesday, November 23, 2011

Recursively Add Public Folder Permissions

Last week I found myself having to export (for archival) and remove a large tree of Public Folders. I thought the task would be easy, open Outlook, highlight the top level folder and Export to PST.

Little did I know someone changed the top-level permissions of the folder I previously created, removing any admins from the list, so any new folder in the tree inherited the lack of admin rights. Now I had to change permissions on 472 folders, not something to be done individually.

A short search yielded just the info I needed. There is a script called AddUsersToPFRecursive.ps1 in the \Microsoft\Exchange Server\Mailbox\Scripts directory; use and syntax is below.

AddUsersToPFRecursive.ps1 -toppublicfolder \Finance -User "Joe Admin" -Permissions Owner -Confirm:$False

Change the -toppublicfolder to \ or \Marketing\Calendars, whatever suits your needs. And be sure to add the -Confirm:$False switch, otherwise you will have to hit Enter (or Yes) for every folder change. Don't ask me how I know...

Tuesday, November 1, 2011

Setting the Out of Office Reply at the Command Line

If you've ever had to set someone's (like a VP's) Out of Office message because they left town before doing so, and of course don't have access to Outlook Web Access, it can be quite a disruption to your work. Recently I was surfing Jim McBee's blog and found this gem, which he in turn had gotten from Bharat Suneja and the Exchange team.

Just replace the text in bold red and run it in an Exchange Command Shell:

Set-MailboxAutoReplyConfiguration jsmith@contoso.com –AutoReplyState Scheduled –StartTime “11/2/2011” –EndTime “11/9/2011” –ExternalMessage “External OOF message” –InternalMessage “Internal OOF message

Tuesday, October 18, 2011

User Profile Service service failed

While attempting to log onto an Windows Server 2008 R2 system with Exchange 2010 for the first time, I received the following error: "User Profile Service service failed the logon. User profile cannot be loaded."

After much searching, we found that during a reinstall some bits were left in C:\Users\Default\AppData\Local\Microsoft\Exchange Server

Once the files therein were removed, I was able to login successfully. We surmised that since the files were in the Default profile, something was stopping a new profile from being generated.

Wednesday, September 14, 2011

List of Exchange Scripts

I started following Pat Richard's blog a few months ago and have since found his scripts to be quite useful. Even if I'm not using them directly, they've been useful as a reference when writing my own.

He recently created a list of scripts available on his site; stop by and take a look.

Wednesday, March 23, 2011

Exchange Keyword Search

So you want to look for a specific word in all the mailboxes on your server without buying a 3rd party application? Try the Exchange Management Shell.

You need three things on your client system before running the command (this is not recommended to be run on the Exchange server itself)

  1. Outlook 2003+

  2. Exchange Management Tools 2007 or 2010

  3. A configured Outlook profile with a folder for the export


get-mailbox –Database "Mailbox name" | Export-Mailbox –SubjectKeywords "Keyword" –TargetMailbox "Your mailbox" –TargetFolder 'Pick one'

The fields that need changing are in red. If you have multiple databases, the command will need to be run multiple times, and of course, the larger the databases, the longer it will take to run.

Good hunting.

Ps. Thanks to SL @ TM for this tip.

Tuesday, February 22, 2011

Microsoft Learning Snacks

You may have guessed it already, but they're bite-sized videos for learning quite a few of Microsoft's products.

Click here for a full list of what's available, all that is required is Silverlight for viewing.

I'm currently watching the eleven videos for Windows 7, part of my studies for an upcoming certification exam, and they've been pretty good so far. And of course, they're free :)

Sunday, June 13, 2010

Script Samples

There are times when I spent an inordinate amount of time looking for just the right syntax for a command or even the correct command to get the job done. Here are four I put to use in the last few months...

Change Printer Spooler Service Recovery options to Restart
sc failure spooler reset= 60 actions= restart/600/restart/600/restart/600

Backing up an MSDE Database
osql -E -Q "BACKUP DATABASE mdss TO DISK= 'C:\BB_DB_Backup\mdss.bak'"

Copy Database and then Appending with Date
copy t:\plandata.mdb C:\PlanDataBackup /Y

For /F "Tokens=1-8 Delims=.:/ " %%a In ('Echo %Date%') Do (Set All=%%d-%%b-%%c)
@For %%a in ("plandata.mdb") do rename %%a "%%~na-%All%.mdb"

Deleting Old OWA Logs
forfiles -p "C:\inetpub\logs\LogFiles\W3SVC1" -c "cmd /c echo del \"@FILE\" & del \"@FILE\"" -d -21

Friday, April 16, 2010

How Big are those Mailboxes

One thing I truly miss about Exchange 2003 is the list of mailbox sizes that were easily accessible in the GUI. But things must move on and the display in the Exchange Management Console for both 2007 and 2010 lack the ability to populate and view this information.

Exchange Management Shell to the rescue! If you enter just the basic Get-MailboxStatistics command it will be sorely lacking (and the sizes will be in KB). The command below will get Exchange to cough up a full list and friendlier MB display suitable for analyzing in Excel.

Open Exchange Management Shell and run the following:
Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize(MB)”;expression={$_.TotalItemSize.Value.ToMB()}},ItemCount

Tuesday, March 2, 2010

Free PowerShell Editor

Yesterday I began to really dive into a new user script (which uses Exchange Management Shell) to bring it up to date and include more fields and features. As the script complexity grew, Notepad was no longer cutting the mustard.

I thought I'd be using Notepad++ or TextPad, both fine in their own right, but instead found PowerGUI. This PowerShell editor which finds syntax errors, includes definitions and much more; all for the low, low price of free. This seems to be a community supported by Quest Software who has a bunch of fine (not so free) tools for SysAdmins.

I'm now able to work on, and run, the script off network (read: at home). It's a helluva deal for the price, try PowerGUI for your next PowerShell outing.

Monday, November 9, 2009

Exchange 2010 is Now Available

Good thing we had that free eBook to learn Exchange 2010, because the announcement on the official Microsoft Exchange Team Blog says it is out the door and available worldwide.

You can grab the 120 day trial here. And this time there is no 32-bit version, as with the Exchange 2007 trial.

And if you are a TechNet or MSDN subscriber, the full (non-expiring) version is available for download as well.

Monday, October 26, 2009

Free Exchange 2010 eBook

I nabbed this news item from Bink.nu, a very worthy site for the latest in Microsoft news.

You can head on over to Red Gate Software's site for a free eBook on Exchange 2010. I guess I should start reading, it'll be here sooner than later.

Not sure how long this will last, so get'em while they're hot.