Posts by Simon Doy

I am an avid SharePoint enthusiast who works as an Independent SharePoint Consultant based in Leeds, United Kingdom. I am one of the organisers of the Yorkshire SharePoint User Group in the United Kingdom. I have been designing and building SharePoint solutions since 2006.

PowerShell: Script to Update SharePoint Content Type Document Template


Introduction

One of the great things about Content Types are that you can have a document template associated to the Content Type.

This means that when you create a new document a customised word template with its own look and feel can be used to guide the user through the process of filling the document and setting up the content type’s metadata.

Recently, we had the situation where we had content types being used across lots of site collections each for the different departments in the organisation.

One of the management overheads is when a document template needs to be updated. How can you do that programmatically using PowerShell?

Well the following script helps you get that done.

Solution

The PowerShell Script, Update-SPContentTypeDocumentTemplate.ps1 below does just that.

So how do you use it?

Well you provide the URL of the site, the path to the document template and also the name of the Content Type.

It will access the site, check if the content type already has a document template, upload the selected document and configure the content type to use the new document template.

You can decide if you want to update all the child content types which have been assigned to document libraries. if you want to do this which is recommended then make sure you include the -UpdateChild switch.

Example

So what would happen if you wanted to update a number of sites?

Well you can just get a list of the sites and pipe that array into the command and it will update the content type on each site.

Also the same technique could be used to update multiple content types on a number of sites.

Download Script

The PowerShell Script is part of the iThink SharePoint PowerShell GitHub Repository, which can be found here:

https://github.com/ithinksharepoint/PowerShell

Anyway, I hope you find the solution useful, please let me know if you did and also if you have some additions or changes then please share them!

All the best

Simon

Use NPM and gulp build tasks to support Continuous Integration with VSTS and Azure for an AngularJS app


Interesting stuff from Matt, will have to incorporate this into the Invoice Form Application.

Moopoo

Introduction

This is the first in a series of posts will take you through the steps required to take a static website, in my case an Angular SPA and deploy this to an Azure App Service (Web App) via Visual Studio Team Services (VSTS). The Angular SPA is secured by ADALJS and the last part of this series will help us use gulp tasks within VSTS to configure the Angular app for different environments.

The application is built using Visual Studio Code all in HTML and JavaScript, so no Visual Studio and no VS builds. The aim is that when we check code into VSTS source control a build task will run and deploy this into Azure for us. Although my app is written in Angular, only the last post makes actual reference to this and shows anything Angular specific. Your app could be written with any framework you like…

View original post 489 more words