Author: Ulrich Gerting Bojko

Enable versioning on all SharePoint Document Libraries in a Site Collection

Enabling versioning on all document libraries in a site collection or disabling versioning is often quite useful. [ps] Write-Host Loading the SharePoint Powershell Snapin Load Snapins if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" } Write-Host "Starting to update lists and Libraries" $webs = get-spsite http://intranet.domain.com | get-spweb -Limit All foreach ($web in $webs) { Write-Host "Updating Site" $web -foregroundcolor Black -backgroundcolor Yellow foreach ($list in $web.lists) { Write-Host "Looking at list $list" if ($list.BaseType -eq "DocumentLibrary" -and $list.BaseTemplate -eq "DocumentLibrary") { Write-Host "Updating list $list" -foregroundcolor Black -backgroundcolor Green $list.EnableVersioning = $true; $list.EnableMinorVersions = $false; $list.EnableModeration...

Read More

DateDif in SharePoint

The function for calculating the difference between two dates in a calculated column in SharePoint, without counting the weekends: =(DATEDIF([Start Date];[End Date];"D"))-INT(DATEDIF([Start Date];[End Date];"D")/7)*2-IF((WEEKDAY([End Date])-WEEKDAY([Start...

Read More

Office 365 public website – going down

I’ve blogged about the discontinuing of public websites a while back and I promised that I would write an update, when there was something to update on. And guess what! Somethings updating. When the changes was announced, there was a small outcry from a few partners, but really nothing major.┬áThen again, it’s not like Microsoft is announcing this out loud yet. Facts Microsoft is discontinuing the public website feature, that was bundled on an average Office 365 subscription starting March 9, 2015 Existing customers that have a public website will be able to continue running that website until March...

Read More

Office 365 shuts down public website feature

Using Office 365 for a public website have always been a simple but not so sweet ride. Microsoft never got that one right and most likely, that is why they are discontinuing that part of Office 365. According to this support document existing websites will have two years to migrate and new tenants won’t have the feature at all. At the same time they announced that the Public Website feature is going to be replaced with some 3rd party vendor. I’m thinking something like WordPress.com would be a good bet. Since WP.com inherited the old MySpace sites, they have...

Read More

Formatting dates in Itemstyle.xsl

Insert this line at the top xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" That will give you a header looking like this: [xml] <xsl:stylesheet version="1.0" exclude-result-prefixes="x d xsl msxsl cmswrt" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:cmswrt="http://schemas.microsoft.com/WebParts/v3/Publishing/runtime" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> [/xml] Then use the “ddwrt:FormatDate” to show the date i various ways: <xsl:value-of select="ddwrt:FormatDate(@dato, 1030, 3)"/> <xsl:value-of select="ddwrt:FormatDateTime(string(@Publiceret), 1030, 'dd. MMM. yyyy')"/> <xsl:value-of select="ddwrt:FormatDate(string(@Dato), 1033, 7) "/> List of all LCID’s : http://support.microsoft.com/default.aspx?id=221435 Custom date and time formats: http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx...

Read More