This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Usage | |
function IsCurrentUserWithContributePerms() | |
{ | |
IsCurrentUserMemberOfGroup("Members", function (isCurrentUserInGroup) { | |
if(isCurrentUserInGroup) | |
{ | |
// The current user is in the [Members] group | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// List view, display, add and edit – Percent Complete Sample | |
// Muawiyah Shannak , @MuShannak | |
(function () { | |
// Create object that have the context information about the field that we want to change it's output render | |
var percentCompleteFiledContext = {}; | |
percentCompleteFiledContext.Templates = {}; | |
percentCompleteFiledContext.Templates.Fields = { | |
// Apply the new rendering for Status % field on List View and Display forms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------- | |
# Author: Romain Blanchard | |
# Date: 11.08.2015 | |
# Description: Edit all views in a single site collection | |
# ---------------------------------------------- | |
Add-PSSnapin Microsoft.SharePoint.Powershell | |
$SiteUrl = "http://mycpdintg.intg2013.dpgp.emea.loreal.intra/sites/ipanel" | |
$ViewName = "Published Folders" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------- | |
# Author: Romain Blanchard | |
# Date: 13.05.2015 | |
# Description: Add sample data to GDoc application | |
# ---------------------------------------------- | |
param( | |
[String]$SiteUrl=$(throw 'Parameter -SiteUrl is missing!') | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------- | |
# Author: Romain Blanchard | |
# Date: 21.05.2015 | |
# Description: Delete all Managed Metadata Properties from default Search Service application | |
# ---------------------------------------------- | |
$searchapp = Get-SPEnterpriseSearchServiceApplication | |
$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication $searchapp | Where {$_.Name -like "gdoc*"} | |
$mp | % { Get-SPEnterpriseSearchMetadataMapping -SearchApplication $searchapp -ManagedProperty $_ | Remove-SPEnterpriseSearchMetadataMapping -Confirm:$false } | |
$mp | Remove-SPEnterpriseSearchMetadataManagedProperty -Confirm:$false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title></title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<script type="text/javascript" src="/_layouts/1033/init.js"></script> | |
<script type="text/javascript" src="/_layouts/MicrosoftAjax.js"></script> | |
<script type="text/javascript" src="/_layouts/sp.core.js"></script> | |
<script type="text/javascript" src="/_layouts/sp.runtime.js"></script> | |
<script type="text/javascript" src="/_layouts/sp.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------- | |
# Author: Romain Blanchard | |
# Date: 02.07.2014 | |
# Description: Add SharePoint users to community site (SPWebtemplate). Based on XML input file. | |
# ---------------------------------------------- | |
# -- Script -- # | |
# Foreach Community | |
Select-Xml -Path "users.xml" -Xpath "/config/community" | ForEach-Object { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------- | |
# Author: Romain Blanchard | |
# Date: 22.03.2013 | |
# Description: Export local file's property to CSV file. | |
# ---------------------------------------------- | |
# -- Options -- # | |
$LocalPath = "files" | |
$logfile = "output-filename.csv" | |
$count = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------- | |
# Author: Romain Blanchard | |
# Date: 28.06.2012 | |
# Description: Get local computer disks status | |
# ---------------------------------------------- | |
# -- Script -- # | |
write-host "" | |
write-host "---------- Disk status ----------" -ForegroundColor Yellow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------- | |
# Author: Romain Blanchard | |
# Date: 10.04.2013 | |
# Description: Download all SharePoint wsp solutions from SharePoint farm. | |
# ---------------------------------------------- | |
# -- Initialize -- # | |
Add-PSSnapin Microsoft.SharePoint.PowerShell –erroraction SilentlyContinue | |
# -- Options -- # |
NewerOlder