Skip to content

Instantly share code, notes, and snippets.

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
#See https://docs.microsoft.com/en-us/openspecs/sharepoint_protocols/ms-wssts/8bf797af-288c-4a1d-a14b-cf5394e636cf for all list template IDs.
#Replace the three variable values below with those you wish to use.
$ListTemplateId = 108
$sites = Get-SPSite -WebApplication https://sharepoint.contoso.com -Limit ALL
$saveCSVLocation ="C:\Users\Public\Downloads\"
foreach($site in $sites)
{
# Load snap-in if not already
if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
{
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
# Stop timer service and begin cache-clearing
Stop-Service SPTimerV4
$folders = Get-ChildItem C:\ProgramData\Microsoft\SharePoint\Config
foreach ($folder in $folders)
<style type="text/css">
/* Show all fields in form */
.ms-formtable tbody {
display: table-row-group !important;
}
.ms-recommendations-panel{display:none !important;}
</style>
@nchambe
nchambe / StoplightCalculatedColumnFormula
Last active May 6, 2019 21:18
Stoplight Status Indicators
="<DIV style='font-weight:bold; font-size:40px; color:"&CHOOSE(LEFT([Cost KPI],1),"green","yellow","orange","red")&";'>●</DIV>"
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("label[for='Choice_x0020_column_050c58f8-1a48-4a44-b758-7dcec69ddb2aFillInRadio']").text("Other, please explain");
});
</script>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
(function () {
var attachmentsFiledContext = {};
attachmentsFiledContext.Templates = {};
attachmentsFiledContext.Templates.Fields = {
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript">
/* Sticky headers for all Custom Lists, Document Libraries and administration lists
* ---------------------------------------------
* Created by Daniel Stoelzner
* stoelzner.daniel@gmail.com
* http://spoodoo.com
* Copyright (c) 2016 Daniel Stoelzner (Licensed under the MIT X11 License)
* v3.1.1 for SharePoint 2013 and SharePoint Online
* LastMod: 27th of May, 2016
@nchambe
nchambe / headers
Last active December 24, 2018 17:09
<style>
/*Choose your background color*/
.ms-viewheadertr{
background:#00426A;
}
/*Choose font style*/
.ms-vh2-nofilter, .ms-vh2, a.ms-headerSortTitleLink {
font-weight:bold;
<script type="text/javascript">
<!--
var origUrl = window.location.toString();
var editUrl = origUrl.replace("OneClick","EditForm");
window.location = editUrl;
//-->
</script>
</div>
</div>