Why is Office 365 going slow?

Is your Office 365 running slow at random times? Does it seem to happen at work but be fine from home (or some other location)? Here is a short check list to help diagnose the problem.

Where is your Office 365 Tenant located?

Make sure your tenant is hosted in a location that makes sense. For us New Zealanders, the nearest location is Australia. Check the Office 365 Datacenter map.

Are you behind a Firewall or Proxy Server?

All Office 365 services use SSL. Firewalls and Proxy server with SSL Packet Inspection enabled can be a source of latency, especially if they are under a heavy load. Does turning off packet inspection improve performance? Does the Firewall’s console show high memory or CPU usage? This article ‘Should you use SSL Inspection’ by Forinet is a good read and applies to other vendors too.

Check your international bandwidth

In New Zealand some ISP’s limit the amount of international bandwidth allocated to each customer. If you have a large number of users, this could be a bottleneck. Talk to your ISP about the bandwidth allocation. Some may also have Office 365 specific plans.

Express Route is another technology that can improve performance for Azure and Office 365. See Microsoft’s Express Route partners and peering locations document. Talk to your ISP about Express Route.

Are you connecting across a WAN to your company internet connection?

If you are working from a branch office, then your internet traffic may be passing over a WAN link before getting to the internet. How much bandwidth do you have and are you sharing it with other traffic? Are you slowing down when someone prints a big file?

Other things to check

  • Network switches on your local LAN. Look for packet loss, latency and retry errors
  • Wireless network. Is the issue related to your WiFi only?
  • Your PC (or Mac). Is the problem specific to one device?
  • Run a speed test on your internet connection.
  • Are you over your data cap?

For a details example of how to troubleshoot Office 365 performance, read this article from Microsoft Premier Support.

There are other reasons Office 365 might be running slow, but in my experience most issues relate to the environment users are in. Try to eliminate the easiest things first.

Surface Pro alternative keyboard

I was first in line to get a Surface Pro 3 when they first came out. It’s a great piece of hardware with good performance, a great screen, plenty battery capacity and will run all the applications I need day to day. Microsoft improved many of the earlier Surface devices weaknesses and it became a popular device.

I spend a lot of time away from my desk and out of the office. I take my Surface with me everywhere. The form factor combined with kick stand is great for working on planes, in cafe’s or in my car, but it does have some short comings. Sometimes I want to work from a couch or chair without a nearby hard surface to put the Surface on. The standard keyboard lacks the rigidity needed to make that type of working, leaving you thinking I really do need a laptop at times.

After considerable use for the past couple of years my keyboard was starting to wear out and so starting looking at the alternatives. Do I get the Surface Pro 4 keyboard (compatible with the Surface Pro 3)? What alternatives are there?  I stumbled across Brydge Keyboards, who make alternative keyboards for all your favourite tablets.

The Brydge 12.3 (https://www.brydgekeyboards.com/products/brydge-12-3) is not only an alternative keyboard, it also removes the need to use the Surface’s Kick Stand. You can use your Surface like a normal laptop, but without splashing out for the more expensive Surface Book. Brydge also offers a version with storage expansion.

They keyboard is made from aluminium, weights in at 675grams, has a back light, connects with bluetooth and runs for 3 months between charges. This combined with great reviews on several major websites, means it is seriously worth investigating further!

The release date is May 2017. You can pre-order now.


PowerShell:Bulk load files into SharePoints

Here is a script I wrote to bulk upload files and metadata into SharePoint. To make this work you need two things, a CSV file containing the names of the files to upload and the metadata associated with the item.

In this example, the CSV file has the following format:

  • filename,cust_number,document_type

The script reads the CSV file, creates a folder in the document library named with the value of the “cust_number” field, and then uploads the file “filename” and populates the “document_type” column.

The WebClient command is used to upload the file into the document library. The script also checks the item in (if required).

Write-Progress -Activity “Connecting to SharePoint Site,” -Status “Please wait …”
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

$CSVFile = “C:\FilesToImport\filelist.csv”

$SPWebURL = “http://sharepoint/site”
$SPListURL = “http://sharepoint/site/library/”
$BaseFolder = “C:\FilesToImport\Files”
$Credentials = [System.Net.CredentialCache]::DefaultCredentials

$SPWebObject = Get-SPWeb $SPWebURL
write-host $SPListURL
$SPListObject = $SPWebObject.GetListFromUrl(“library/Forms/AllItems.aspx”)
$WebClient = New-Object System.Net.WebClient
$WebClient.Credentials = $Credentials

Write-Progress -Activity “Importing CSV File,” -Status “Please wait …”

$CSVObject = Import-CSV $CSVFile
$Index = 0
$Max = $CSVObject.Count

ForEach($CSVItem in $CSVObject)
Write-Progress -Activity “Updating Metadata” -Status “Processing Item $Index of $Max”

$FileName = $CSVItem.File_name + “.pdf”
$ID_Number = $CSVItem.Cust_Number
$DocumentType = $CSVItem.Document_Type

$FullFileName = $BaseFolder + “\” + $FileName
write-host $FullFileName
if (Test-Path ($FullFileName))
$UploadPath = $SPListUrl + “/” + $Cust_Number + “/” + $FileName
$WebClient.UploadFile($UploadPath, “PUT”, $FullFileName)$SPListItemsObject = $SPListObject.Items | where {$_[‘Name’] -eq $FileName}
ForEach($SPListItem in $SPListItemsObject)
$SPListItem[‘Document_Type’] = $DocumentType

if ($SPListItem.file.CheckOutStatus -ne “None”)
Add-Content ErrorLog.txt $FullFileName

I’ve used this script in a few scenarios. I hope you find it useful too.

5 Steps for migrating documents to SharePoint

Migrating Process Oriented Documents

One of the challenges with SharePoint projects is content migration. It can be a daunting task with both technical and human challenges. This post discusses a five step methodology for migrating content from a file server into SharePoint.

This strategy revolves around identifying the documents that will be migrated based on the business value they bring rather than a “big bang” approach.

Experience tells us that once people start working with SharePoint, their idea of how it will work best for them evolves. For this reason, we advocate starting with a pilot content set rather than trying to tackle the entire file server in a weekend.

Step 1: Decide what to migrate

Choosing the documents to migrate first is a key part of this strategy. This needs to be achievable and of value. If the set of documents is large or complex to migrate then issues will be magnified. If the documents are of low value then no one will care.

Business process centric documents are a good place to start. These documents are produced as part of a business process and will (hopefully) be stored in one place on the file server. It is also generally easy to identify who uses the documents. It is also easy to place a value on these documents.

Conversely, choosing to migrate all the documents for a group of users, is going to be difficult. These documents could be high value for the owners, but most other people probably won’t benefit from the migration.

If the document is produced from an external system e.g. an ERP system ask, “Do these documents need to be stored in SharePoint?” If the ERP is the source of truth, then storing a second copy in SharePoint may not be necessary.

Step 2: Define your rules

Not all documents have the same requirements from compliance, legal or business process perspective. Agree on and document your standards:

  1. How long do you need to keep these documents?
  2. What meta-data do you want to record about these documents?
  3. What security requirements do the documents have?
  4. Is versioning necessary and if so how many versions?
  5. Do these documents need approval before publishing?
  6. Who owns these documents?

Your file server will be full of documents but do they all need to be migrated? Think about your business requirements and whether you migrate:

  1. All documents
  2. Documents created in the last X months
  3. Leave existing documents on the file server, but create new ones in SharePoint

Make sure these rules are documented and agreed by your key stakeholders.

As part of this step you may be faced with some decision around organising content in Document Libraries. See our Metadata vs Folders post for more details.

Step 3: Test the theory

Test the system with a small but representative sub-set of the documents. Make any adjustments and test again until the “owners” are happy with the configuration.

Your test should include the following:

  1. Security on the Document Library
  2. Check out/in status – compulsory meta-data can result in documents being checked out when they are uploaded
  3. Other settings including approval, versioning and any workflow.

Step 4: Migration

Now you have defined what it is you will migrate, the migration rules and tested the process, it is time to do it for real.

Before you begin…let your SharePoint Admin know what you are about to do. Bulk copying files can impact other users in SharePoint and consumes space on the SharePoint database servers.

Rather than uploading files one at a time, try using Drag and Drop or Explorer view to transfer files (maximum of 100 documents at a time). Keep in mind the limitations of SharePoint document libraries, by default the limit is 5000 documents in a library or a folder within a library. Folders can be used to increase the number of items in a library however you should consider other factors such as security, navigation and search before using folders.

If you are migrating large volumes of files we recommend using specialist SharePoint migration tools such as SharegateAveDoc Migrator or Metalogix Content Matrix.

Note that upload performance can be slow, especially if the SharePoint server is being accessed across a relatively low speed connection.

Step 5: Review and Repeat

Now that you have completed the migration of your first business processes documents, review the process, make any adjustments and repeat for the next set of documents.

Document migration is labour intensive. Create a roadmap for migration. Break migration tasks into a series of time-boxed sub-tasks will help keep the migration team on task and moving towards the end goal in an organised way.

 Migrating everything else

This is the first blog in our series on document migration. In our next post we will talk about migrating collections of loosely related documents. Following on from this we will cover topics including migrating content between test and production, onsite to the cloud and integrating with other systems.


Uploading Documents in to SharePoint

SharePoint un-representable Datetime issue with Publishing sites

I recently had a serious issue with a SharePoint 2016 farm. Any site with Publishing enabled would fail to display giving a correlation error.

UPDATE: This issue is definitely related to Token Timeout settings. It was pretty common to adjust these settings in older SharePoint versions, but SharePoint 2016 doesn’t behave the same. See comments for more details.

Application error when access /Pages/Home.aspx, Error=The added or subtracted value results in an un-representable DateTime.  Parameter name: value   atSystem.DateTime.AddTicks(Int64 value)     at Microsoft.SharePoint.Publishing.CacheManager.HasTimedOut()     at Microsoft.SharePoint.Publishing.CacheManager.GetManager(SPSite site, Boolean useContextSite, Boolean allowContextSiteOptimization, Boolean refreshIfNoContext)     at Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ComputeRedirectionVirtualPath(TemplateRedirectionPage basePage)     at Microsoft.SharePoint.Publishing.Internal.CmsVirtualPathProvider.CombineVirtualPaths(String basePath, String relativePath)     at System.Web.Hosting.VirtualPathProvider.CombineVirtualPaths(VirtualPath basePath, VirtualPath relativePath)

I tested creating a new web application and site collection using the Team Site template. This worked successfully. I tried again using a Publishing Site template and the error above  appeared.

The issue appeared to be timezone related and so we checked the timezone and locale settings on all servers in the farm and the site collections to make sure they matched.

The ULS log also pointed us towards the Security Token Service and then the TokenTimeOut setting. Bingo! The SharePoint 2016 farm was using Mini-roles and the server host the Security Token Service had failed to pickup the configuration update with the timezone settings and so didn’t match the rest of the farm.

To resolve the issue we did the following:

Initially we had installed the farm with United States timezone, when a change was made to use New Zealand time, the configuration didn’t fully update on all servers and the Security Token Service was responding with US Date format making things very unhappy.

Publishing pages use the Security Token Service to validate pages. If the validation fails the page doesn’t load. Team sites without Publishing enabled are OK as they don’t do this validation.

Microsoft Teams

Microsoft Teams is a new collaboration tool for Office 365 users. It is available now in “preview” to anyone with Office 365 Small Business, Enterprise and Education plans.

Firstly, what is Teams? If you believe the hype on social media then it is the death of Slack, but I think that is a pretty superficial view. I think it will be more interesting to see what Microsoft does with Yammer next and we let Slack worry about their business.

Teams brings chat based collaboration to Office 365. That’s the key point here, it makes it easy to converse, get links from recently worked on documents and create virtual teams with the people you work with.

Key features

A short (but not complete) list of features:

  • Ability to create teams from other users in Office 365
  • Instant messaging
  • Outlook integration for meetings
  • SharePoint Online and One Drive for Business integration for files
  • Integration with Trello, Github, Wunderlist and Twitter via connectors

Getting Started

Before you can start using Teams, it must be activated on your Office 365 Tenant. This is done via the Admin Portal using these instructions.

Once done, Teams can be accessed via the website https://teams.microsoft.com or using the Apps for Windows, iOS and Android. In the Apple App Store search for “Microsoft Teams”.

Expect updates

I’ve watched Microsoft develop Power BI over the last couple of years then I think we can probably expect a similar approach for Teams. Lots of regular updates bringing incremental improvements very rapidly.

The first update I would like to see is the ability to federate with other Office 365 tenants. The ability to collaborate better with other organisations must surely be high on the feature roadmap!

Recovering SharePoint

As a SharePoint Administrator, it is critically important that you understand the backup process. Don’t just take the word of the person whose job is to look after backups, then aren’t experts in SharePoint. You should also take time to understand the different recovery options available to you and practice restoring each scenario, so when disaster strikes the recovery process is understood and appropriate to the situation.

Over the past two or three months I’ve received a couple of calls from people with serious SharePoint issues wanting to know how to roll back to a previous backup. Before doing that it you really need to ask yourself do I really need to roll back and what is the impact?


On one occasion the issue was related to a failed installation of a SharePoint CU. The SharePoint farm was down and had a very large amount of content.

Key Point: The issue was a failed CU install.

In this case the Configuration Database was corrupt but the user content was OK. The solution was to restore the Configuration Database only (take a backup of the current one first, just in case). Once this was done the Cumulative Update was reapplied.

In another case the issue was a user had deleted a site containing several document libraries. The site collection recycle bin had been emptied, so items couldn’t be recovered from here. The site collection contained many other sites and restore from backup would have resulted in a day’s worth of changes being lost.

Key Point: The issue was with one content database

SharePoint allows ‘Unattached Content Database recovery’ via Central Admin. To get the site back, we restored the Content Database from the most recent backup to a different name and then used Central Admin to extract the missing site from the restored the missing site.

In both cases above the recovery was quick because SQL dumps were being used to backup the SQL server hosting SharePoint’s databases. Some backup solutions allow item, library and site level restore and this could have also helped.

One thing to bear in mind when thinking about backup software is that some solutions need sufficient disk space to restore the database before extracting the items you want to recover. I’ve heard of more than one person struggling to recovery because they don’t have space available.

Remember that SharePoint has recycle bins at both the user and site collection level. This should always be the first place you look.

My advice to SharePoint Administrators is to make backup and recovery a priority. Own it because if disaster strikes, you are the person people will turn to.