The power of PowerShell

To quote a colleague of mine:

“Be one with PowerShell”.

This statement holds near and dear to me.

Learning PowerShell has been a life changing skill, one which has paid many dividends. Having an understanding of PowerShell enables you to work with almost all of Microsoft’s services / products… and more importantly, understanding PowerShell lets you learn about a product quickly… it allows you to address problems at scale, on the spot, and get things done with relative ease.

There is practically a cmdlet for everything in the m365/o365 suite (except for intune, last time I checked). Therefore, understanding how to use get-help and Microsoft docs lets you administer things like Exchange Online, Skype for Business, SharePoint Online, and AzureAD with relative ease.

Product knowledge is without a doubt of great importance, understanding the fundamentals and principals behind the technology you’re administering is certainly helpful. Knowing where to look, though, is king. In the age of the cloud, where everything is fluid and changing — it’s not entirely about what you know at any given moment… rather… the value comes from what you can potentially know, how fast you find it, how quickly you can learn it and what skills you have to ACT on the findings.

PowerShell is the backbone of enablement, onboarding and administration.

Having been with one of most decorated Microsoft partners in the U.S. for nearly 3 years now, I’ve impacted some of the largest customers in the world. Having played a critical role on multiple projects has provided me insight into the things I’ve stated above. That is to say.. PowerShell is truly the great equalizer. Know it well. Know its inner workings and the world is yours.

How To Get The Total Number of BadItems and Kind of BadItems for Failed Move Requests

A common bad practice when it comes to migrating mailboxes, is to set the badItem limit to 10, 20, 30, 40, 50 etc, and keep incrementing until Resume-MoveRequest finally works. When you do this, you’re blindly accepting large data loss, without knowing exactly what kind of items are corrupt or the total amount beforehand.

Here is a simple way of determining the total number of corrupt / bad items a mailbox move request has encountered, and exactly what type/kind the bad items are. In order to utilize this guide, you will need to connect to Exchange Online PowerShell if you’re moving the mailbox to o365, or use the on premises Exchange Management Console if you migrating on premises.

Before we start I will provide you with a basic summary of what we’re doing to accomplish this task. We are going going to take the MoveRequestStatistics of the mailbox and export that data to XML. Doing this supplies us with a number of details that are not prevalent within the standard -IncludReport switch. Once we have exported the data to XML, we will import it back into powershell and store it in a variable, which we will access using dot notation.

Step 1. Connect to Exchange Online Powershell OR open Exchange Management Console.

Step 2. Export the MoveRequestStatistics Report to XML:
Get-MoveRequestStatistics -Identity user@contoso.com -IncludeReport | Export-CliXML C:\Location\of\YourChoice\FileNameGoesHere.xml

Step 3. Import the XML data and store it in a variable:
$BadItems = Import-CliXML C:\Location\of\YourChoice\FileNameGoesHere.xml

Step 4. Review the total number of items and the kind of items that are corrupt:
$BadItems.report.baditems.count
##(this is to get the total count)

$badItems.report.baditems.kind (this is to view the kinds of bad items)

**Bonus**
BadItems.report.baditems | Out-GridView
##(This will open a GUI explorer to review all of the bad items and their kinds.

Before we go on to step 5, I would like you to understand a few types of acceptable bad data… that would be Security Descriptors and Calendar Properties. Those tend to be the most common. Be careful not to accept actual corrupt items. Once you have determined the kinds of items are within scope of acceptable data loss.. move on to step 5.

Step 5. Increase the bad item limit to the total number you retrieved for the cmdlets above:
Set-MoveRequest -Identity user@contoso.com -BadItemLimit 25

Step 6. Resume the move request (or set -CompleteAfter switch to $null, depending on your scenario)
Resume-MoveRequest -Identity user@contoso.com

OR

Set-MoveRequest -identity user@contoso.com -CompleteAfter:$null

How to fix “RequestExpiryCleanup” Error in a Hybrid Exchange Environment.

Scenario:
A Hybrid Exchange Environment is in place and you are having problems migrating a mailbox from Exchange Online (Office 365 Email) back to Exchange on premises.

Symptoms:
When you attempt to off board the user, the move request takes an unusual amount of time to validate. Once it finally validates, the move request is generated but the request gets stuck at 0% and shows a StatusDetail of “RequestExpiryCleanup”.

Things You’ve Already Tried:
You have attempted to remove the move request and have created a new off boarding request a few times. However, the problem still persists.

Solution:
Do a targetless move request from within Exchange Online. This will move the mailbox into a different database within Exchange Online. Here’s how:

1. Connect to Exchange Online PowerShell

2. Remove the problematic move request and migration user:

Remove-MigrationUser -Identity stuckuser@contoso.com
Remove-MoveRequest -Identity stuckuser@contoso.com

3. Perform the targetless move request (move the mailbox to a new DB in EXO)

New-MoveRequest -Identity stuckuser@contoso.com

4. Monitor the move request, until completion:

Get-MoveRequestStatistics -Identity stuckuser@contoso.com

Once the new move request finishes, go back into the Exchange Admin Center via the O365 portal (or use PowerShell) and generate a new off boarding request.

Hope this helps!

Office 365 and The Curious Case of Microsoft Teams.

Recently I have noticed a bit of paranoia circulating many professional networks, in regards to Microsoft’s latest SaaS offering: Microsoft Teams. The primary concerns appear to be that Teams may replace some core services like SharePoint and Yammer – and potentially even the Exchange/Outlook stack. However, according to the CEO of Microsoft, Satya Nadella – that is NOT in the cards. Below I will provide you with my own insight into the field, and together we will walk through a school of thought one should consider, when implementing Office 365’s collaboration and productivity solutions.

One of the primary concepts behind any form of productivity, is to help structure and generate employee participation, while stimulating creativity. Commonly one finds that many employees encounter difficulty familiarizing themselves with a particular work flow. Sometimes it feels unnatural to them, or otherwise limits their capacity to carry out their best work. That is where Office 365 as a platform really shines. Microsoft brings to the table a suite of tools, similar to a Swiss army knife of software, that truly enables one to pick a solution and jump right in. Office 365 enables one to FIND their own workflow, redefining the way we think about our workspaces.

At first glance such a breadth of choice could seem chaotic to management, but I can assure you, by design it is actually removing the monkey wrench that was wedged between your organization and getting things done effectively. Within Office 365, one will discover not only an entire bundle of productivity driving applications but also a trove of tools that generate analytics, provide measures of security and compliance as well as legal archiving features. Management can dive deeply into their tenancy to determine which employees prefer which method or work flow, thereby having an opportunity to utilize these findings to adjust and improve upon their processes. Ultimately preparing their workforce for the future of a modernized, personalized workspace.

To elaborate, Office 365 has several core collaboration and productivity applications for employees to choose from:

Outlook / Exchange Online for well thought out, structured communication that conforms to traditional security practices and work flow. Enabling timely collaboration, and insight into co-workers calendars and availability. Exchange provides many compliance features, eDiscovery and legal / litigation based archiving and reporting tools.

SharePoint Online for intranet capabilities and document storage, which enables traditional and new age forms of collaboration, internally or externally. SharePoint Online provides teams a way to share sites which contain the most critical documents driving day to day processes, and easy access to secured data for all compartmented workflow.

Skype for Business Online for traditional and instant chat communication, enterprise voice functionality (Cloud PBX, VOIP, etc) video chat and meetings; which provide strong security and follows industry standard compliance standards.

Yammer for internal bulletin functionality which drives business collaboration and provides a unique way for co-workers to interact and produce a daily overview of what is taking place within an organization.

Microsoft Teams which provides communication functionality via a social, channel based chat space. Teams integrates many underlying technologies found within the Office 365 infrastructure – including voice, video and meetings. Strong compliance and discovery aspects, similar to those found within traditional services like Outlook / Exchange and SharePoint Online can also be utilized.

As you can see, there are a plethora of services available for you to choose from. Some familiar and some new, all of which produce proven results and drive collaboration to new heights. There are many other services found within Office 365 – some honorable mentions: OneDrive for Business, Visio, Project, Word, Excel, PowerPoint (to name just a few) – which are industry leading tools in the field of business productivity. Additionally there are ways for employees to improve their own workflow and productivity, utilizing tools such as MyAnalytics. The aforementioned service provides a way to look into ones own day to day usage and figure out ways to improve themselves. MyAnalytics is not to be confused with services within the tenancy, that management may implement to understand usage and productivity per se. Consider it way to improve ones own work habits.

In summary, Office 365 offers one of the most flexible suite of services. Each with its own use case. With that being said, one should not fear change but embrace it – that is what cloud technology was fundamentally designed to do: improve and introduce innovation, while providing choice to those who choose to use it! One must learn about each component, discover its purpose and implement a solution accordingly. I hope this has provided some understanding of Office 365, Microsoft Teams and Microsoft’s approach to the realm of productivity. Please visit again soon, as I plan to regularly update this blog and provide a source of understanding to business owners, management and IT professionals alike.

Introducing Microsoft Teams

microsoft-teams_iconHas anyone had a chance to look at the new service Microsoft announced yesterday called “Microsoft Teams”? Teams seems like it could be a really beneficial component for team collaboration. It can easily be turned on via the Office 365 admin portal.

products.office.com
and tools your team needs to be more engaged and effective.

 What makes it great is that it integrates a lot of software all of us are familiar with but folds it all into a single pane of productivity. Seems pretty promising.

*Note* Once it has been turned on in the admin portal, it is instantly provisioned. The icon will not be available, however, you can access Teams immediately by navigating to https://teams.microsoft.com