Retrieve Mailbox Migration errors for Office365

When you have a lot of mailboxes to migrate, Microsoft’s provided method of viewing the errors involves a tedious amount of clicking by logging into the portal, selecting Exchange, Migration, View details, scroll down to find a failure, select the user, click view details.

Viewing Migration status in Office365

 

Rather than use the tedious method of going into the details, selecting a user and then viewing details, run the following powershell script (once connected using the previous office365 connection script)

get-migrationuser -status failed  | get-migrationuserstatistics | select identity,emailaddress,recipienttype, error,bytestransferred |export-csv c:\temp\migrationstatus.csv

I also have a simple loop that gets me the status once an hour. Obviously change the email address’s appropriately.

while (1)
{
$a=(get-migrationuser | out-string)
send-mailmessage -to [email protected] -subject “Company Migration Stats” -from [email protected] -smtpserver my.mailserver.com  -body $a
start-sleep -seconds 3600
}

Fixed – Office365 journalling does not work for one user

I’ve been working on a case with Microsoft’s Office365 support for several weeks trying to find out why email sent *to* a particular user was not being journalled. All the other mail seemed to be journalled to the external recipient, email from the user was working, just not email to that user.

The experience was quite frustrating as Microsoft’s support were terrible at calling back and could not grasp the concept of email tracking. Their solution after making a change was to wait a day to see if it was fixed although it was quite apparent that the Microsoft servers were not even trying to send the email (by looking at the Trace Logs you can see what email was being sent and received).

After checking the connectors were setup, mail properly scoped, the user had no rules on their mailbox, Microsoft’s solution was to delete the mailbox and reset it up again.  Not so easy when the mailbox/user is federated with Active Directory and the user happens to be the owner of the company. That was not a conversation I was going to have with them!

The only thing that was different with this user was that in troubleshooting this issue we had set the user up to receive the journalling non delivery reports. I figured that if the emails were not being delivered, maybe sending him the errors would help. However no reports were being received either.  However, according to KB 2829319 this behaviour can be seen. Although I had removed the journal receipient in the web gui, the emails were still not being journalled until I added another external email address to the configuration using the powershell command set-transportconfig -JournalingReportNdrTo [email protected]

At this point, all the email started to be journalled.

Note that we only added the recipient into the mix when I was trying to work on the initial problem so it looks like this wasn’t the only fix.

The other thing we did was change the outboundconnector to be onpremises. Changing the setting in the GUI we then ran Set-OutboundConnector archivemymailconnector -routeAllmessagesviaonpremises $true.

 

These two combinations seemed to fix the issue.

One thing I also learnt was that it is really useful to send multiple emails between changes and keep the subject line starting the same. Use the date/time at the end of the email. That way you can sort the email logs by Subject and just pick out the ones you were working on. By having the subject start with zzz followed by Round X (ie zzz Round 1 – change connector – 1345pm and zzz Round 1 – change connector 1346pm ) then the results are likely to appear at the end of your mail logs if you sort by subject.  Sorting by Date was not always a good idea as mail flow could occur between mail coming into the server and mail leaving the server.

 

Fixed: Office 2010 installation with MAK key gives Error: Can’t decode PIDKey – Invalid digits! ErrorCode: 0(0x0)

After doing an administrative installation of Office Professional Plus 2010 for a client, I was trying to test the installation of office on a desktop machine but kept getting “Error: Can’t decode PIDKey – Invalid digits! ErrorCode: 0(0x0).” as the error message. I confirmed that the key was correct by doing a manual installation of the software and using the same product key that was successful. I was unable to find any useful pages on the internet with this error message so ended up logging a call with Microsoft Product Support to troubleshoot the installation.

Our troubleshooting steps were to remove the updates folder completely and try an installation – this worked so we knew the problem was in the updates directory. Recopying back the files from the extracted service pack 1 dvd worked successfully so the problem was either service pack 2 or the setup.msp file. I copied back the sp2 files and again the software installed successfully (note that having a virtual test pc makes these tests very easy. No uninstalling of office required!)  Again the installation was successful. I then copied the setup.msp file back into the updates directory and the installation failed again. As the configurations that are made in the setup.msp can either be set in the config.xml or group policy it was ok to proceed without using the setup.msp.

Full details of the log files and more information can also be found at the Microsoft forums where I posted the initial request for help.

Retrieve user friendly list of users who have full access to a particular mailbox in Office365

We had a request to provide a list of users who have Full access to a mailbox in Office 365. The get-mailboxpermission is pretty straightforward, but the results show the Windows username as opposed to the descriptive name for the user. The following script should provide the information needed. Note that the first 3 lines connect to Microsoft Online (you will be prompted for username and password) – the last two are the magic ones. Replace “User name” with the users first and last name ie “Andy Helsby” in my case

$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session

$userlist = Get-Mailbox "user name" | Get-MailboxPermission | Where-Object { ($_.AccessRights -eq "Fullaccess") -and ($_.IsInherited -eq $false) -and -not ($_.User -like "*nt authorityself*") }
$userlist | foreach {get-mailbox $_.user}

If I can work it out, I’ll update the script later to provide a report for all mailboxes – in the meantime this works for 1 mailbox at a time.

Funnily enough, this report didn’t actually help the reason we were asked for the report – that was because the user had issues connecting to someone else’s mailbox. It turns out that the Microsoft Online password had been changed and outlook was using the cached credentials. By removing the stored passwords in the control panel, Outlook prompted for the password and everything started working.

Office 2010 almost here…

I’m running the Office2010 beta at home (mainly for Outlook and OneNote2010)  and would highly recommend it when it is finally released. If you are running Exchange2010 then there are even more reasons why you should be running Outlook2010. (Note that a lot of the extra features such as mailtips and access to the archive mailbox are already available with the outlook web access app). If you purchase and activate Office 2007 between now and Sept 30 2010, you will be able to upgrade to 2010 via a free download. You will need a LiveID, the receipt and to register your purchase. More details available at the Office2010 Technology guarantee website.

Multiple calendar management in Outlook2010 – copying appointments

I’m using the Outlook2010 beta at home and loving it. The interface is nice and clean and there are several nice features that are new to the program. One of the things that I discovered this morning was that copying an appointment from one calendar to another automatically selects the same date and time on the destination calendar as the original calendar. This obviously makes sense as if you were going to copy an appointment from a colleagues calendar, or a shared internet calendar to your own calendar, it is likely that you want the same times. All you have to do is drag the appointment over to anywhere on the new calendar and  the appointment is automatically copied across. In outlook2007 the copy functionality is still there, but you have to get the right date and time as you copy the appointment – more flexibility but more time and care is needed when placing the appointment.

See the screenshot below for some details. (You’ll probably need to click on it to see the full details.Showing how to copy an item from one calendar to another in Outlook 2010

Removing pesky paragraph marks

I’m sure you’ve all had the annoying experience when you are typing in a Word document or an outlook email and all of a sudden the screen is filled with backwards P’s – the paragraph marks. I’ve never been able to work out what triggers this to occur until today when I decided to find out after yet another helpdesk ticket came in asking how to turn this function off. (It is especially tricky in outlook as the button does not appear in the standard toolbars within outlook.)
I found that pressing ctrl, shift and 8 (or more correctly ctrl *) will toggle the paragraph mark status. I suspect that the keyboards are registering the ctrl key being held down at the same time as the shift 8 key is being pressed to get a * displayed in the text.
Note that you can find out what other shortcut keys take affect by right clicking an empty part of the toolbar, clicking customize, selecting the Options tab and then enabling “Show shortcut keys in Screen Tips” and then clicking ok to close the dialog boxes. Turning this on helped me determine the buttons to press.

Unable to run outlook – prompting for installation key – fixed

I had a remote user, working behind a vpn connection to the office log onto the pc for the first time (which was a hard job in itself – I had to use the dial up networking login to authenticate to the domain and cache credentials to the workstation). This user was having problems running outlook with the software prompting him to provide the location for the office source files with the error message “Error 1706. Setup cannot find the required files. Check your connection to the network, or CD-ROM drive. For other potential solutions to this problem, see C:\Program Files\Microsoft Office\Office10\1033\Setup.hlp”
Entering the network installation location did not work. This issue is documented in KB Article 297834 which didn’t help what so ever, the setup /fvm took forever to run but didn’t work.
However, if I logged on as the administrator user outlook would run successfully. So I added the user to the administrators group and I still got the same error message.
Looking in the eventlog I got the generic error 1004, but I did get the message “Detection of product ‘{90110409-6000-11D3-8CFE-0150048383C9}’, feature ‘OutlookUserData’, component ‘{8ADD2C9C-C8B7-11D1-9C67-0000F81F1B38}’ failed. The resource ‘HKEY_CURRENT_USER\ Software\ Microsoft\ Office\ 11.0\ Outlook\ UserData’ does not exist.
Copying the registry entries for the admin user for the Office\11.0 tree didn’t work either.
A search on google for 11.0\Outlook\UserData came up with the article kb0106250 on rangersuite. I modified the text file to only include the version 11 entries, ran it and outlook ran through the first time wizard and the user (and I) was very happy.
For completeness sake, the registry entries to fix this problem are in the extended entry.

Continue reading “Unable to run outlook – prompting for installation key – fixed”

Outlook/office dialog boxes look funny.

For some reason, one of my (terminal) servers has started to show funky dialog boxes in office applications. Everything looks plain, like in vb3 days and the options dialog box in outlook is unusable as the dialog is too small for the content. Any ideas on what has caused this?
Wrong dialog box

wrong

Correct Dialog box – everything fits in the screen (although I snipped the bottom off)

correct

Update – Mike – you are a genius. The funny thing is that I thought it was the fonts but at first glance it seemed ok. However, I compared the fonts in the appearance setting of the display applet in control panel and sure enough, the font settings were blank. A look at the Tahoma font in the font applet and it was 0 bytes – aha! Installed Tahoma again across the network and the fonts and dialog boxes are now back to normal. – Sir, I owe you a pint.