Removing unlicensed users in Office 365

I was faced with a situation where I had 17,020 users that synced up into Office 365 but my Office 365 license was like about 5…

So one of the quickest paths I took was to fire up PowerShell and remove all users that did not have a license.

These are the steps I took to get the job done:



Type in your Office 365 Global Admin credentials:


Get-MsolUser -all | Where-Object {$_.isLicensed -ne "true"} | Remove-MsolUser -Force


Anyway, curious to see the rate it deleted the users, I thought of monitoring the process by opening another PowerShell window and ran this:


Type in your Office 365 Global Admin credentials

Get-MsolUser -All | measure


Turns out the above command took three minutes to run (around 15,600 users) and deleted approximately 36 users per minute. The above command, will progressively run faster as the user count goes down.

Once I’m done, I’ll be configuring up the DirSync version of Forefront Identity Manager 2010 R2 (FIM) to selectively sync a few of the choicest users in my AD infrastructure.


Export migrate all wsp solutions from your SharePoint farm

A few recent migrations I worked on required me to export and import all Farm Solutions from one SharePoint farm to another SharePoint farm. There are a few blogs and tools available to get this done.

However, I came across Shane Young’s brilliant one line PowerShell command to get the job done!


Export all of the Solutions from your farm:

(Get-SPFarm).Solutions | ForEach-Object{$var = (Get-Location).Path + "\" + $_.Name; $_.SolutionFile.SaveAs($var)}


Import all of the Solution into another farm

Get-ChildItem | ForEach-Object{Add-SPSolution -LiteralPath $_.Fullname}

Note: Shane’s blogpost has the third step to deploy all these solutions. Not all Web Applications may need to have farm solutions deployed to them. So – you might want to plan this one, rather than deploy all these solutions in one go.


Check out Shane’s blogpost:

MOSS SharePoint 2007 SSP migration to SharePoint 2010

In SharePoint 2010 there isnt any Shared Service Provider SSP. There is a recommended pathway by Microsoft for upgrading your Microsoft Office SharePoint Service  (MOSS) 2007 SSP database to SharePoint 2010.
Basically, the “SSP” in SharePoint 2010 consists of various “Service Applications”. I.e User Profile Service, Mysites (which is runs off the User Profile Service) and Managed Metadata Service.

No doubt, depending on your SSP functionality, there is excel services and the BDC which has seperate SharePoint 2010 Service Applications.

Search is now an OOTB Out of the Box ‘service’ in SharePoint 2010. I have also written other posts in this blog on Search on SharePoint 2010 with specific focus on the more superior FAST Search for SharePoint 2010.

Here is the pathway you can follow to migrate your SSP into SharePoint 2010:

Upgrade the shared services database

  1. Create an application pool for the User Profile service.
  2. Verify that the Managed Metadata service is enabled.
  3. Enable the User Profile service and upgrade the SSP database.
  4. Create a new proxy for the User Profile service application and associate it with the default proxy group.

 Here is the pathway you can follow to migrate your SSP into SharePoint 2010: