Tuesday, November 29, 2016

Migrating Outlook Tasks to SharePoint 2013 Tasks

I was give tasks to migrate Exchange task to SP 2013 task.  During the migration from Exchange on prem to O635 it was discovered that certain groups of users who use tasks as part of their work process were having their task archived because of the tenant policies in O365.  The goal was to allow the users to still access their task without having to go to archive in Exchange.  
I did some research and all I could really find was how to synchronize between Exchange and SP.  We really did not want to sync the tasks we wanted to move the task.  ​So I called Microsoft for some guidance and this is what they provided:
I was able to successful export outlook tasks and import them into a SharePoint list using the following procedure:
  1. I exported my list of tasks in outlook by going under File > Open & Export > Import/Export > Export as a file > Comma Separated Values (CSV) > Selecting my task list
    1. https://support.office.com/en-us/article/Export-contacts-from-Outlook-10f09abd-643c-4495-bb80-543714eca73f
    2. https://kb.wisc.edu/office365/page.php?id=38832
    3. Note these two articles outline the same procedure, while they may specifically refer to a particular outlook version or type of data exported (i.e. contacts) this same process applies to multiple versions of outlook and task items
  2. I imported the csv file to SharePoint
    1. Under Site Contents > Add an App > Import Spreadsheet > Follow on-page instructions to select csv file and to select the range of cells
    2. https://support.office.com/en-us/article/Create-a-list-based-on-a-spreadsheet-380CFEB5-6E14-438E-988A-C2B9BEA574FA
    3. Note the only updated change in this article of instructions is that "Import Spreadsheet" is it's own app when you add it under site contents, it is not under "Custom List"

Here is the output of my exported task list:



Here is the output after importing this to SharePoint



In general the process of exporting tasks as a csv file, then importing the csv into SharePoint seems like the best option for your scenario. A few process variations can be made. For example you could in theory use a PowerShell script to import the csv file into SharePoint.

The key assumption here is that you can access the task list via the Outlook client. If this is not the case please let me know where the task list is housed and I can engage an Office engineer to assist with that piece of exporting the tasks.

The first part was pretty straight forward.  All the tasks in the shared email account exported to CSV as advertised.  The 2nd part however was a little more complicated.  The issue that I ran into was this:  Yes all the task were imported into SharePoint as a LIST.  But I did not want a list I wanted the Exchange tasks to migrate SharePoint task which is a specialized list.  Using a SharePoint task list would allow my users to open up the tasks in Exchange and Project, if they choose. 


But my dilemma was only that it did not migrate into a SP Task but also that there were a few extra rows added to the csv spread sheet that I migrated out of Exchange.  I am not sure how a default task list would look like if you exported it from Exchange but it seemed to me as if a few columns were added to suit the user’s needs. 

Note: One more important step is to save the CSV File as a XLSX file.  You will need to use it later on!! J
  


But Now that I had a basic idea of what I needed to do I did some research on my own.  I would recite my sources but the way that I came by this procedure was a little convoluted and obscure.  I used a lot of trial and error and data finessing.  But what I found was that Access was far better equipped to handle my needs than Excel.  So I used the list that I imported from CSV file as a template to change/added rows to my task list that I created in SP 2013.
   

I added all the missing columns and made changes to “type” of columns that existed if necessary.   I then opened my SP 2013 Task List in Access 2013. 

 Choose the EXTERNAL DATA Tab in Access and clicking on the "more" dropdown. 

I added the site collection that held my SP Task list that I customized and chose link the data source by creating a linked table.   I typed in the credentials for the SharePoint site.  (must have edit permissions)

You will get a list so just choose the Task that you created and customized.
The task will come up as an access db. 

Once you have opened up the database you can choose EXTERNAL DATA again from the main menu, then choose Excel.

You will need to then browse to the XLSX file that you have created from your CSV file.  And run through the wizard. 
Note:  the important part about this procedure is making sure that headings on the Excel file are exactly the same as the columns in Task list that you created in SharePoint and that the functions of the columns match as well or you will get errors in Access and you will not be able in import the Doc until you get everything right.  This is the reason why you use your imported CSV file that you created a list from in SP2013 as a template.  After you get your task imported you can go ahead and delete the list that was created from the CSV import. 

And there you have it migrated tasks that are accessible from Exchange.   

more notes that could prove useful.

Getting the rows into a task list specifically will require a bit more of an intensive process to import. After talking to my teammates we have 2 options here:

1.       Copy and Paste CSV rows directly into a SharePoint Task List
a.       You must have the appropriate columns in the CSV matching existing columns in the Task List
·         Pros: Easy to configure, very little setup required
·         Cons: If there are errors they will have to be handled manually, depending on the # of tasks at hand there could be troubles copying and pasting in bulk (+100 rows at a time)

2.       Create a PowerShell script to go through the CSV and import them to the Task List
·         Note the above article applies to both 2010 and 2013
·         Pros: Scales up to larger task lists, re-usable
·         Cons: Will require some development to get this to work for your specific scenario

·         Please note that if we proceed and we do go the PowerShell route, we will not be providing an actual script ready to use for your environment, but we can give additional resources and demonstrate how one would go about importing a csv into a task list.






Monday, November 14, 2016

Exchange 2010 database fails to mount

I had a problem getting the databases for Exchange to mount on a DAG cluster server.  The server was running 2 nodes in active/passive configuration.  I tried mounting the database and I got :

Database 'Dag Group' can't be mounted on server 'Server Name' due to a previous error: A corrupted log file for copy 'Dag Group\Server Name' was detected: Log file 'File path.log' is corrupt. Error: Unexpected log file size: 'File path.log has 0x0 bytes.Recovery was attempted by marking this copy as Failed and failing over to another available copy.If the failover doesn't succeed, the database will remain dismounted until a mount operation with the -Force operation is used. Before performing this mount, any passive copies that need the corrupted log should be suspended. Verify that the underlying cause of the error has been corrected before attempting to mount the database. The error can be ignored and the mount allowed if Mount-Database is reissued with the -Force switch.

After doing some research I can to realize that I had a bigger problem.  It was not just a corrupted log file that I was dealing with.  I did actually take the log file from the "healthy" cluster node database volume and copied it to the database that did not mount on the problem node as was suggested to do in this article 

I was able to figure out that I had a cataloging issue when I ran the following powershell command:

Get-MailboxDatabaseCopyStatus *



The results showed the content index state as Failed. Powershell was showing that my passive node was healthy but when I tried to move the the DAG to the passive cluster I would get the error as stated in the beginning of this article.  I was thinking that the answer was to make the passive node active.  But the real answer was to just to delete and recreate the catalogue.  So I did some more research and I found this article which outlines the steps necessary recreate the index. I ran the same commands on each server and waited for I am not sure how long.

recreating the index took some time, in fact I ended up calling MicroSoft because the actual indexing took so long. But MicroSoft showed me a few things:

[PS] C:\Program Files\Microsoft\Exchange Server\V14\Scripts>.\CollectOverMetrics.ps1 -DatabaseAvailabilityGroup DAG1 -IncludeExtendedEvents --  This command creates a csv file that gives you the overall health of your DAG including log files.

Get-DatabaseAvailabilityGroup *  -- This command will type back all the server in your DAG,

Get-MailboxDatabaseCopyStatus *\* -- This command will type back the status of your DAG Groups of course.