Friday, February 26, 2016

SharePoint: Get Quotas via PowerShell

I wrote a little script to get Quotas of specific Site Collections.
First of you will need this file:
This will simple accept an array of Site Collections. Simply add the Site Collection to the array like this:
$siteCollections = ("", "")

This file will call a function in the module: It is important to not that you should not edit the existing code, because otherwise it might not work. It is also designed in a way, that you can call this module / the function included in any other .ps1 as long as you provide the parameters needed. In this case it is simply a list of Site Collections.
I think is pretty self explaining, but just a few word:
- If the Quota is 0, then there is no Quota and you will get the message "no Limit"
- If you storage is 0, no files or data is stored
- If the Quota is greater than 0 and the storage is greater than 0 you will a usage in percentage

At the end you will get a .csv called "SCQuota.csv".

Monday, February 8, 2016

Kerberos Configuration with PowerShell

I had to configure Kerberos, SPNs, Delegations and what not for a SharePoint BI Installation without being able to connect to the AD or being able to give more complex instructions. In short: I had to give a script to the AD admins. Mind you: This is still a work in progress, so changes might come (or not).

I wrote a function to set SPNs, delegation and allow unconstrained Kerberos delegation:
I put my code in this extra file to keep it safe in a way. An admin won't need to take a look at the file to change it, because all changes are made in this file:
You only need to change the values after "set-kerbuser", remove or add new users and servers. Here are some examples to help you fill out the code:
Example for Domain: "SP"
Example for HTTP/DNS-Value: "HTTP/"
Example for SP/ACCOUNT: "SP/spfarm"
Clarification: Account names for Instances in this case are named after the Instance, but they don't have to be

You have to add the trust delegation to the accounts, f.ex. Excel is supposed to trust the relational instance, so the code would look like this:

All you need is the identity / account name and the servers you want to delegate trust with. In this case tried to keep it as simple as possible, that's why I'm using an unconstrained delegation.
You can find both scripts in my GitHub ->

Sunday, February 7, 2016

SharePoint 2013: Content Plugin can not be initialized

I found this error in my Event Logs:
And no, that was not all. The error was suppressed a couple of hundred times. Every 5 minutes I got an error like this:

How did I solve that? Well, not that easy, but I will give you a couple of possible solutions!

1. Check your .Net Versions
You can the script I found here.

2. Check the folder permissions
You will have to check the permissions of the folder where your search is supposed to be working. Use this script if you don't know where to look: The local groups WSS_WPG and WSS_Admin_WPG need Full Control for that directory.

3. Search might be broken
Yeah, the Search is a little troublemaker sometimes. Just create a new search and be done with it.