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
function CreateTeamsite() { | |
var url = _spPageContextInfo.siteAbsoluteUrl; | |
teamsiteValues = { | |
"Title": $('input[id=ctl00_PlaceHolderMain_txt_name]').val(), | |
"BusinessUnit": $("#sel_bu option:selected").text(), | |
"Description_x002f_Purpose":"test", // $('input[id=ctl00_PlaceHolderMain_txt_purpose]').val(), | |
"Members": peoplePicker_Members.GetAllUserKeys(), | |
"SecondaryOwner": peoplePicker_secondaryOwner.GetAllUserKeys(), |
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
using System; | |
using System.Collections.Generic; | |
using System.Net; | |
using System.Security.Principal; | |
using System.Security; | |
using Microsoft.SharePoint.Client; | |
namespace StefanG.Tools | |
{ | |
class CopyPeopleColumn |
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
The way workflow get triggered from code behind is different in SharePoint 2013 | |
//Instantiate Workflow Manager | |
var wsm = new Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager(web); | |
//Get Workflow Instane ID | |
var subscription = wsm.GetWorkflowSubscriptionService().GetSubscription(new Guid("{2DC2893B-DEC0-433A-BB34-8DC0CD9CC8FC}")); |
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
Function ChangeSiteCollectionAdministrators | |
{ | |
Write-Host -Foregroundcolor green "- Changing the site collection administrators" | |
$site = Get-SPSite | ?{$_.Url -like "*sites/tempSite*"} | |
If ($site -ne $null) | |
{ | |
Set-SPSite -Identity $site.Url -OwnerAlias "DOMAIN\farmacc" -SecondaryOwnerAlias "DOMAIN\svcacc" | |
Write-Host -Foregroundcolor white "- Site Collection Administrators for '$site' is changed." | |
} | |
} |
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
#------------------------------------------------------------------------------------------------------ | |
# Name: Get-CrawledProperties.ps1 | |
# Description: This script will show you the crawled property names for a document library | |
# Usage: Run the function with a Document URL as the parameter. | |
# By: Ivan Josipovic, Softlanding.ca | |
#------------------------------------------------------------------------------------------------------ | |
Function Get-CrawledPropertyNames([string]$DocURL){ | |
$DocURL = $DocURL.Replace("%20"," ") | |
$webfound = $false | |
$weburl = $DocURL |
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
Param( | |
[string] $url = $(Read-Host -prompt "Enter Site Collection URL: ") | |
) | |
if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) | |
{ | |
Add-PsSnapin Microsoft.SharePoint.PowerShell | |
} | |
Write-Host " " |
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
param ( | |
[string]$DBserver = $(throw "Missing server name (please use -dbserver [dbserver])"), | |
[string]$path = $(throw "Missing input file (please use -path [path\file.txt])") | |
) | |
#Set Variables | |
$input = @(Get-Content $path) | |
#Addin SharePoint2010 PowerShell Snapin | |
Add-PSSnapin -Name Microsoft.SharePoint.PowerShell | |
#Declare Log File | |
Function StartTracing |
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
$web = Get-SPWeb http://sharepoint/sites/training/salestraining | |
$list = $web.Lists["Announcements"] | |
$list.fields | select Title, InternalName, StaticName | sort title | ft -AutoSize |
OlderNewer