List all MS Teams
I have just had a client want a list of all the Teams in thair Office 365 Tennant and they could not find a quick way to do this via the MS Teams Admin Center. The following commands run in PowerShell got the listing they needed.
PowerShell Arrays and that annoying number on the screen
When you create an array and populate it in PowerShell the number of elements is written out to the screen, very annoying. e.g. Output So how do we stop the numbers from being displayed to the screen, while Fix 2 is the proper way I like fix 1 as it reminds me of passing things […]
That x64 setting.
Today the following error was being thrown by a new SharePoint c# application, “An unhandled exception of type ‘System.Runtime.InteropServices.COMException’ occurred in Microsoft.SharePoint.dll” with the following detail: “Additional information: Retrieving the COM class factory for component with CLSID {BDEADF26-C265-11D0-BCED-00A0C90AB50F} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).” The application […]
Virtual box to Hyper-V is one easy step
Tip of the day, this tip has been shamelessly stolen from Diary of a SharePoint consultant like many others I run Virtual Box and have lots of different environments ready to run to aid development & migration and the thought of re-creating them in Hyper-V has filled me me dread for quite a while now. I […]
Office 365, ADFS & SSO

So you have made the move into Office 365, you have ADFS so you can have a single sign on so your user do not need to worry about logging in when they are in the office but it is not working, you check your ADFS setup and it looks good once you users logon […]
Keeping your PowerShell tidy
I am quite a fan of Powershell but miss the ability to include other files in a simple and clean way. I quite like the idea that as you run scripts in the different environments dev, test, UAT, staging and production they should never change, the only thing that should change are the variables in […]
PowerShell script to create an AD group in an OU
Active directory you have got to love it, using it as a base to secure up access to SharePoint is quite an important thing to understand but who wants to create the groups, better pass it over to a script to do. This script is a starter and will create an AD group in a […]
SQL Server Audit
Who did what and when did they do it? SQL Servers has some fantastic audit capability but sometimes a client will want to hand craft their own and this script can act as a place to start. The script will create audit tables that will audit what your users are up to. The script has […]
Database documentation
Documentation is the bane of my life you design a fantastic database and someone tells you that they would like to know how it works, so the task begins. This script will take a look at the database and do the graft for you, if you have been well behaved and added descriptions to objects […]
Database CRUD scripts
The use of a database is always a good idea and not giving users any direct access to the tables is an even better idea but wrapping the tables with stored procedures that you can secure up by group membership is a little bit of a pain, this script will enable you to create all […]
What site template did that SharePoint site start as?
Sometimes you need to figure out what template was used when creating a SharePoint site, you can mess about in the database (not recommended) you can look in the HTML of an output page as long as your master page has not changed some of the default options or you can open up the SharePoint […]
Move that SharePoint SubSite into its own site collection.
So it seemed like a good idea at the time, all of the sites on the root site collection but now you are beginning to regret that the content database is getting a little on the large side and managing the security is getting to be a pain. So how do you move this subsite […]
Finding that SharePoint Correlation ID
So you have an issue in SharePoint and a screenshot form a user in a production environment. You have asked the production support team to put SharePoint log viewer onto the server and they have submitted the request to the change group and will get back to you in a couple of days and in […]
PowerShell script template
This file is the Powershell template file that I use when creating PowerShell scripts. The code below is a functioning PowerShell script for you to build on, it has the syntax for the Get-Help cmdlet to function correctly and takes three parameters some mandatory some not, it also outputs to the screen the script execution […]