This file contains hidden or 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
/* http://sharepoint.stackexchange.com/questions/151473/how-to-truncate-a-multiline-column-in-a-sharepoint-list-2013 */ | |
<style> | |
.ms-vb2 .ms-rtestate-field{ | |
max-width:250px; | |
max-height:38px; | |
overflow:hidden; | |
} | |
.ms-vb2 .ms-rtestate-field:hover{ | |
max-height:none; |
This file contains hidden or 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
//Permission enumeration : https://msdn.microsoft.com/en-us/library/office/ee556747(v=office.14).aspx | |
function checkPermissions() { | |
var call = jQuery.ajax({ | |
url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/effectiveBasePermissions", | |
type: "GET", | |
dataType: "json", | |
headers: { | |
Accept: "application/json;odata=verbose" | |
} |
This file contains hidden or 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://portal" | |
function AddGroupToSite ($web, $groupName, $permLevel) | |
{ | |
$account = $web.SiteGroups[$groupName] | |
$assignment = New-Object Microsoft.SharePoint.SPRoleAssignment($account) | |
$role = $web.RoleDefinitions[$permLevel] | |
$assignment.RoleDefinitionBindings.Add($role); | |
$web.RoleAssignments.Add($assignment) | |
} |
This file contains hidden or 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
$url = "." | |
new-spuser -UserAlias 'domain\userName' -web $url -SiteCollectionAdmin |
This file contains hidden or 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
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned | |
#Enabling SQL Server Ports | |
New-NetFirewallRule -DisplayName “SQL Server” -Direction Inbound –Protocol TCP –LocalPort 1433 -Action allow | |
New-NetFirewallRule -DisplayName “SQL Admin Connection” -Direction Inbound –Protocol TCP –LocalPort 1434 -Action allow | |
New-NetFirewallRule -DisplayName “SQL Database Management” -Direction Inbound –Protocol UDP –LocalPort 1434 -Action allow | |
New-NetFirewallRule -DisplayName “SQL Service Broker” -Direction Inbound –Protocol TCP –LocalPort 4022 -Action allow | |
New-NetFirewallRule -DisplayName “SQL Debugger/RPC” -Direction Inbound –Protocol TCP –LocalPort 135 -Action allow | |
#Enabling SQL Analysis Ports | |
New-NetFirewallRule -DisplayName “SQL Analysis Services” -Direction Inbound –Protocol TCP –LocalPort 2383 -Action allow | |
New-NetFirewallRule -DisplayName “SQL Browser” -Direction Inbound –Protocol TCP –LocalPort 2382 -Action allow |
This file contains hidden or 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
alter database DEV13_Service_ManagedMetadata | |
set offline with rollback immediate | |
go | |
alter database DEV13_Service_ManagedMetadata | |
set online | |
go |
This file contains hidden or 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
$Assem = ( | |
"Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" , | |
"Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" | |
) | |
$Source = @" | |
using Microsoft.SharePoint.Publishing.Administration; | |
using System; |
This file contains hidden or 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 emailResults() | |
{ | |
$fromEmail = "[email protected]" ; | |
$toEmail = "[email protected]","[email protected]"; | |
$smtp = "mail.domain.local" ; | |
$mailSubject = "Top search queries for the week of " + $curDate ; | |
$mailMsg = "<html><body><p> Please see the attached for this weeks top search queries</p> |
This file contains hidden or 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 AddWebSiteProperties(siteUrl) { | |
var clientContext = new SP.ClientContext(siteUrl); | |
oWebsite = clientContext.get_web(); | |
alert(oWebsite); | |
clientContext.load(oWebsite); | |
alert("Load"); | |
var props = oWebsite.get_allProperties(); |
This file contains hidden or 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
#Set up default variables | |
#My Site URL | |
$mySiteUrl = "http://mysite/" | |
#The part of the picture URL you are trying to find | |
$currentURLValue = "http://mypersonalsite" | |
#The value that will replace the above | |
$newURLValue = "http://mysite:80" |