Living a SharePoint life

Thursday, October 29, 2015

Latest release of the SPBestWarmUp Script available

I finished the updates on the latest version of the SPBestWarmUp script and we’re heading version 2.0 (Stockholm). You can get it here on Codeplex.

SPBestWarmUp is a PowerShell script that will load all of your SharePoint web sites. By doing so it helps to populate the IIS and the asp.net caches. This will speed up accessing your server and give your users a better overall experience.

Change log:
  • Removed the Internet Explorer to fetch webpages and switched instead to the Invoke-WebRequest Cmdlet. IE will be deprecated in the future anyway.
  • Collecting all relevant Urls prior fetching them from the server.
  • Temporarily removed the ability to use own Urls. Will be added in the future as a parameter and/or as a file. However, if you look at the code, you’ll find it isn’t hard to write your own little patch if you need to.
The code is marked as beta. To use it, collect a copy from the source repository.

Feedback is welcome. If you find any issue, please use the issues panel on the Codeplex project site.

Wednesday, October 21, 2015

Change the SQL recovery model in bulk with the PowerShell

Sometimes you need to configure settings on your SQL server in bulk, like e.g. the recovery model. In my case, we needed to change all databases to the Full recovery model, due to the usage of Always-On. Scince SQL 2012 there is a great way to do this with the PowerShell.

First open a Powershell and see if the SQL PowerShell module is loaded.
Get-Module SQLPS
If it isn't loaded, do so by using
Import-Module SQLPS
For scripts you should check if the module is loaded before you import it like this:

if ((Get-Module "SQLPS" -ea silentlycontinue) -eq $null)
{
    Import-Module SQLPS -DisableNameChecking
}
Now you can change to the SQL server by simply entering SQLSERVER:

Use ls or dir to see what options you have

Change the 'directory' with cd SQL. This way you go to the SQL server configuration. Do so as well for the servers host name and the SQL server instance, until you you enter the databases directory. Here you'll find all the databases hosted by the SQl server instance you choose. Now we can run the following script to change the recovery model in bulk.
foreach ($db in ls) {
  if ($db.RecoveryModel -ne "Full") {
    $db.RecoveryModel = "Full"
    $db.Alter()
  }
}

Monday, September 14, 2015

Trickshots: Testing a SQL connection quick and easy

Did you ever need to test a SQL connection? As a SharePoint Pro you probably have. I found a nice little trick on Steve Rachui's Blog today I’d like to share with you.

Create a new text file on the desktop of the machine you will try to connect to the SQL server. Name the file whatever you like, but rename the file into UDL. Double click on the file and a dialog pops up with SQL connection settings. Enter your connection settings and use the Test Connection button in the lower end of the dialog.

If you need to test a different SQL server port (not 1433), simply create a SQL alias on the machine and test against the alias.

Wednesday, September 9, 2015

Toolbox: SharePoint 2013 Search Tool

Using the SharePoint REST API can be sometime a bit of a pain. Good to have some tools at hand that make life more easy. With the SharePoint 2013 Search Tool you learn how to build an HTTP POST query, and how the different parameters should be formatted.

After running the query, you can view all the different result types returned, e.g. Primary Results, Refinement Results, Query Rules Results, Query Suggestions and the actual raw response received from the Search service.

SharePoint 2013 On-Premise and Office 365 are both supported.

To download visit the project page at Codeplex:
https://sp2013searchtool.codeplex.com

Tuesday, August 18, 2015

Kerberos and SharePoint

Keeping a SharePoint environment secure is one of the biggest challenges for an IT-Professional. Kerberos is the strongest Integrated Windows authentication protocol available so far. That is why it should always be used in a SharePoint Farm instead of NTLM.

Inferno, Canto VI, 12-35, Cerberus – From William Blake
https://commons.wikimedia.org/wiki/File:Cerberus-Blake.jpeg
Kerberos supports advanced security features including Advanced Encryption Standard (AES) encryption and mutual authentication of clients and servers. The protocol allows delegation of client credentials and from all the available secure authentication methods. It also requires the least amount of network traffic to the Active Directory controllers. Kerberos can reduce webpage loading latency in certain scenarios as well.
This post is

Monday, May 11, 2015

Securing SharePoint 2013 connections via TLS - Part 2

Securing your SharePoint servers via TLS is mandatory these days. Learn how to encrypt your Site Collection communication and how to configure automated redirection to a secure connection.

Picture by Ondrej Supitar / unsplash.com

In part 1 I showed you how to secure a Host Named Site Collection with TLS. But a user can still open the site collection without encryption. To force a secure connection we’ll have to create an automated redirect from http to https.

Leave the unsecure binding


You might think it’s a good idea to remove the http binding from the web application in IIS. But this would break your configuration, so don’t do that. Instead the binding is necessary for IIS to know which web application handles the request. From here the URL Rewrite module we are about to configure will take over.

First things first


To create a redirect we need an IIS extention called URL Rewrite which isn’t part of the regular IIS installation and cannot be found in the Windows installation either. Instead you must open a browser and download it from the official IIS support site http://www.iis.net/downloads/microsoft/url-rewrite

This post is

Friday, May 8, 2015

Securing SharePoint 2013 connections via TLS - Part 1

Securing your SharePoint servers via TLS is mandatory these days. Learn how to encrypt your Site Collection communication and how to configure automated redirection to a secure connection.

Picture by Ondrej Supitar / unsplash.com

Using SSL/TLS to secure your webservers has always been a good idea, not only since three letter agencies are eavesdropping on everybody’s Internet communication. Preventing hacking and information lost is also on the IT-Professionals to-do list for a very long time.

Which certificate do we use


There are a few ways to get a new certificate for the Internet Information Server, but all in all in breaks down to the simple question: Do I need a trusted certificate or not.

If you plan to publish your site to the web I’d suggest you get yourself a trusted certificate from a certificate authority. There are a lot of different certification companies out there and all of them are happy to take your money.

If you plan to stay in a local network, you could consider using your own Public Key Infrastructure (PKI). But this however might be shooting a little too high. Especially if you only have a few servers to secure and no other plans to use the PKI.

This post is

Wednesday, May 6, 2015

Ignite 2015 Sessions about SharePoint 2016 on Channel 9

Are you looking for and update about SharePoint 2016? Here you'll find a selection of the Ignite 2015 sessions held in Chicago. If you miss a video in my list, fell free to leave a link in the comments below and don't forget to spread via facebook and twitter ;)


The Evolution of SharePoint: Overview and Roadmap   
It’s been an exciting year for SharePoint and we’re been hard at work evolving features and capabilities both online and on-premises. This session has a little something for everyone—users, IT pros and developers. We'll cover numerous aspects of SharePoint Server 2016, SharePoint Online, hybrid and everything in between. Lots to share, lots to learn.
http://channel9.msdn.com/Events/Ignite/2015/FND2203

Effective Search Deployment and Operations in SharePoint Server 2013  
SharePoint 2013 introduces a flexible and highly customizable search topology, providing a scalable framework to meet demanding requirements for query and indexing performance. In this session we will share experiences from the field of real world multi-node search installation case studies, review best practices for common operational procedures, and position IT to meet the unique demands of hybrid search scenarios. You will learn proven tips and tricks on how to keep your search system healthy and your users satisfied with their search experience.
http://channel9.msdn.com/Events/Ignite/2015/BRK3176

Deep Dive into Safe SharePoint Branding in Office 365 Using Repeatable Patterns and Practices  
This session demonstrates how the use of repeatable, proven, and secure patterns and practices can help developers create a safe branding solution that they can implement in Microsoft Office 365.
http://channel9.msdn.com/Events/Ignite/2015/BRK3164

Migration to SharePoint Online Best Practices and New API Investments  
In this session we provide an overview of best practices to migrate Files Shares or on-premises SharePoint environment to SharePoint Online. First we will focus specifically on defining a holistic migration approach, the Content Migration Process, replacing full trust solutions, and addressing network capacity concerns. We will then talk about the new SharePoint Online Migration API in that area and what to expect out of it. This will be followed by more in depth explanation on how to fully take advantages of those new capability.
http://channel9.msdn.com/Events/Ignite/2015/BRK3153

Designing and Applying Information Architecture for Microsoft SharePoint and Office 365  
This session demonstrates a proven process for defining, designing, implementing, and governing your information architecture (IA). IA is more than just columns and metadata. Learn how the different components available in SharePoint and Microsoft Office 365 can be leveraged to their fullest potential and your users' ultimate benefit to content organization and discovery.
http://channel9.msdn.com/Events/Ignite/2015/BRK3190

Microsoft SQL Server BI Drill Down  
SQL Server Business Intelligence delivers a comprehensive platform empowering organizations to build and deploy secure, scalable and manageable BI solutions. Please join us to learn more about SQL BI. We will showcase mobile BI implemented on-premises and optimized for SQL server, highlight SQL Server BI key capabilities and discuss the strategic investment areas and roadmap for Microsoft SQL Server Analysis Services and Reporting Services.
http://channel9.msdn.com/Events/Ignite/2015/BRK2552

Proven Ways to Build Robust, No-Code Solutions in Microsoft SharePoint  
In SharePoint there are many tools available to create elaborate solutions to tackle the most common business scenarios. In this session, see the true power of tools such as Microsoft Access 2013 apps, Microsoft Excel 2013 PowerView, SharePoint Designer 2013 Workflows, Microsoft InfoPath 2013, out-of-box SharePoint features and more! Gain a deeper understanding of how these tools are used in SharePoint to create robust end-to-end SharePoint applications, on-premises and online—without writing a line of code. We help you learn how to create custom, no-code solutions for your organization.
http://channel9.msdn.com/Events/Ignite/2015/BRK2150

What's New for IT Professionals in SharePoint Server 2016  
In this session, we have a lot of new information for admins, sharing what's new and coming in the next on-premises version of SharePoint - SharePoint Server 2016 - with insights on hybrid, too. More detailed information to be posted as we get close to Ignite.
http://channel9.msdn.com/Events/Ignite/2015/BRK2188

Virtusa: Establishing SharePoint Hybrid for Social, Search and Personal Storage  
In this Session, Shehan details their hybrid journey over the last 3 years, building a dynamic enterprise spanning SharePoint on-premises and Office 365. He will focus on three main areas: 1) their strategy of integrating social (Yammer) with their Systems of Record for 10,000 global employees, 2) bridging the content divide with hybrid search, and 3) enabling all employees to use their personal work files in Office 365. You will learn how to accomplish a sustainable, beneficial hybrid deployment rooted in solid strategy, planning and execution. Virtusa Corporation (VRTU) is a global information technology (IT) services company providing IT consulting, technology and outsourcing services: www.virtusa.com.
http://channel9.msdn.com/Events/Ignite/2015/BRK2156

Upgrade to Microsoft SharePoint 2013 and Ready for Cloud Potential  
Have you heard all your SharePoint admin friends talk about how great SharePoint 2013 is, yet your farm is still running at SharePoint 2010, or even worse, SharePoint 2007? Then this session is for you. In this session, Todd goes over the strategies for upgrading to SharePoint 2013 and best practices for reaching ready-for-cloud potential. He then digs into some fun stories about how he's done battle upgrading SharePoint so that you won't have to. This session includes lots of tips, and lots of fun, and in the end you'll be ready for anything the upgrade to SharePoint 2013 can throw at you, and will be set for the future.
http://channel9.msdn.com/Events/Ignite/2015/BRK3115

Setting Up Your On-Premises SharePoint Environment for Custom App Development  
This session walks through the operations and management details of how to set up your development environment on-premises to develop cloud apps and solutions.
http://channel9.msdn.com/Events/Ignite/2015/BRK4104

Ernst & Young: Microsoft SharePoint Server 2013 Search Adoption  
In this case study, Ed Dale discusses the SharePoint Server 2013 search program at EY, providing real-world examples from the EY environment for how to improve your own search environment. The presentation explores various techniques, including optimization of content, user training, search log analysis, relevancy tuning, and voice of the customer initiatives—all of which positively impacted the adoption of SharePoint at EY. Ed will use examples from the enterprise search management program at EY which supports 170,000 users spanning multiple business units, geographies and languages.
http://channel9.msdn.com/Events/Ignite/2015/BRK2130

MVP Panel: SharePoint On-Premises, Online and Everything in Between  
Imagine five great minds coming together to talk about Microsoft SharePoint across the board, be it within Microsoft Office 365, in Microsoft Azure, on-premises and certainly hybrid. Via a panel Q&A format, these MVP experts expose how online and hybrid improvements increase both deployment scenarios and value. This session is designed to help ITIs and ITDMs find the right cloud formula to deploy based on practical business and technical considerations. This is a must-not-miss session for any IT pro!
http://channel9.msdn.com/Events/Ignite/2015/BRK2163

The Social Intranet: Integrate Yammer into Your Microsoft SharePoint Experience  
Yammer is the standalone, end-to-end enterprise social platform for your organization. You can extend the social experience directly into your Microsoft Office 365 or on-premises SharePoint portal with a range of options from Yammer Embed to the REST API. We explore the ins and outs of Yammer integration, capabilities, terms of service, and governance for production applications. Learn how we can use Yammer methods as well as reference the powerful Office 365 dev patterns and practices. There are recommended dos and don’ts, which we highlight with relevant real-world case studies. We cover effective design for enhanced user experience and engagement, making your Portal and Yammer a seamless experience to increase usage and adoption.
http://channel9.msdn.com/Events/Ignite/2015/BRK3201

Elastic SharePoint Storage with StorSimple and Microsoft Azure  
One of the biggest challenges facing enterprise storage customers is massive data growth and the amount of storage management work required to keep up with it. In this session, we dive deep into Remote BLOB Storage architecture, boundaries and scale limits, disaster recovery, and improvements in Microsoft SharePoint Server 2016. In addition, we look at how Azure StorSimple hybrid cloud storage can support SharePoint.
http://channel9.msdn.com/Events/Ignite/2015/BRK4101

Microsoft SharePoint Server with SQL Server: Now Better Than Ever  
Learn how you can enrich your SharePoint Server deployment when you take advantage of specific configurations and features of SQL Server. This session will focus on SQL Server 2014 benefits for SharePoint 2013 and offer insights into how it sets you up for SharePoint Server 2016. We will cover areas of performance, security, reliability – all covered with lots of best practices and core depth knowledge for the most successful better together deployment.
http://channel9.msdn.com/Events/Ignite/2015/BRK4131

SharePoint 2013 and Azure IaaS: Better Together  
Get an overview of the options that Microsoft Azure provides for SharePoint. This session explains and demos how you can utilize Azure to host SharePoint farms for hot and warm standby, segregated farms for your developers, farms for integration testing or productive farms. We explain how you can create your own template for SharePoint servers that enables you to add a server to your farm in Azure or on-premises in 15 minutes. We also help you to develop a backup strategy for SharePoint that uses Azure as the storage for long-term backups.
http://channel9.msdn.com/Events/Ignite/2015/BRK3124

Transforming Your SharePoint Full Trust Code to the Office App Model  
This session is a panel discussion covering examples and patterns for moving SharePoint customizations to the app model - for use either in Office 365 or "cloud-friendly" implementations of on-premises SharePoint. The panel comprises members of the Microsoft Office Dev Patterns and Practices team and independent MVPs. Both bring their experiences from the field, but different perspectives too. The discussion will centre around 5 related hot topics - branding, options around remote code (including .NET, JavaScript and PowerShell), provisioning of customized sites, the story with sandbox solutions and finally how the Office 365 APIs fit in with the app model. We promise a lively discussion, examples of code from the field, and time for Q&A!
http://channel9.msdn.com/Events/Ignite/2015/BRK4125



Wednesday, April 1, 2015

Adding PDF and other MIME Types to the Browser File Handling property

PDF Icon
By default a WebApplication in SharePoint doesn’t consider PDF files safe. If you click on one you may download it to your computer, but can’t view it with Acrobat inline in your browser. Learn how to change this behavior.

Using PDF files in SharePoint is however a very common task. You can store them in document libraries like every other document, open and save them or move them around. But not being able to open the PDF inside of the browser is a very annoying behavior and it forces the user to save copies on their local computer. Haven’t we installed SharePoint to get rid of local copies swarming around the office?

Wednesday, February 18, 2015

SharePoint Tools: A new CAML Query Designer

Praveen Battula has released a new tool on his blog to work with CAML Queries. Not only you can export the plain CAML Query it self, the tool lets you generate code for C#, JavaScript, WebServices and PowerShell as well.

Have a look at his blog:
http://praveenbattula.blogspot.de/2015/02/download-caml-query-designer.html

The future of Forms for SharePoint 2016 and Office 365

As you might remember, Microsoft announced last year, that InfoPath will be discontinued. It seemed the product would come to an end and would only be supported until April 2023. All efforts from Microsoft were heading into Forms designed on SharePoint Lists, or better known as FoSL.

Well these plans have changed. As it seems Microsoft will not be able to provide FoSL on time for the next SharePoint release. Instead they announced that SharePoint 2016 will indeed have full support for InfoPath Forms for Office 365 and On Premises installations. However, a new version of InfoPath will not be part of the next Office.

Read the full story at:
http://blogs.office.com/2014/01/31/update-on-infopath-and-sharepoint-forms/

Wednesday, January 21, 2015

Code Snippet: Iterating thru all websites

How to iterate thru all SiteCollections and containing the Websites. This script also shows a progressbar on screen:

$sites = Get-SPSite -Limit All
$siteIter = 0
foreach($site in $sites) {
    Write-Progress -PercentComplete (($siteIter / $sites.Count) * 100) -Activity "Iteration Sites" -Status $site.HostName
    $webIter = 0
    
    # Do something here
    
    foreach($web in $site.AllWebs) {
        Write-Progress -PercentComplete (($webIter / $site.AllWebs.Count) * 100) -Activity "Iteration Webs" -Status $web.Title -Id 2
        Write-Host $web.Title
        $webIter++
        
        # Do something here
    }
    $siteIter++
}

Code Snippet: Load the SharePoint PowerShell Module

How do you load the PowerShell module for SharePoint?

Addendum: I've added a try/catch block to the code. This way you can be sure the module is loaded.

# Loading SharePoint Module
try {
    if ((Get-PSSnapin "microsoft.SharePoint.Powershell" -ea silentlycontinue) -eq $null)
    {
        Add-PSSNapin Microsoft.SharePoint.Powershell
    }
}
catch {
    throw "Microsoft SharePoint PowerShell AddIn initialization failed"
    exit 3
}

Featured Post

How are Microsoft Search quota consumed?

With Office 365 Search, Microsoft has created a central entry point for the modern workplace. In one convenient spot, users can access all ...