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 "https://domain/sitecollection/site" | |
$list = $web.Lists["Documents"] | |
$item = $list.Items.GetItemById(123) | |
$userId = $item.File.LockedByUser.ID | |
$user = $web.AllUsers.GetById($userId) | |
$impSite = New-Object Microsoft.SharePoint.SPSite($web.Url, $user.UserToken); | |
$impWeb = $impSite.OpenWeb(); | |
$impList = $impWeb.Lists[$list.Title]; |
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 "https://domain/sitecollection/site" | |
$list = $web.Lists["Documents"] | |
$item = $list.Items.GetItemById(123) | |
$item.File.ReleaseLock($item.File.LockId) | |
$web.Dispose() |
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
//self-executing anonymous function | |
(function () { | |
// String overrides | |
function DiscussionListViewStringOverride() { | |
Strings.STS.L_SPDiscHeroLinkAltText = "New Label"; //change "New Label" into your desired one, eg. "Create News" | |
Strings.STS.L_SPDiscHeroLinkFormat = "New Label"; //change "New Label" into your desired one, eg. "Create News" | |
} | |
DiscussionListViewStringOverride(); | |
ExecuteOrDelayUntilScriptLoaded(DiscussionListViewStringOverride, "strings.js"); |
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
#example: $AccountList = @("DOMAIN\User" , "DOMAIN\Group") | |
$AccountList = @("DOMAIN\User") | |
$wapps = Get-SPWebApplication | |
Foreach($webapp in $wapps) | |
{ | |
foreach ($SiteCollection in $webapp.Sites) | |
{ | |
write-host $SiteCollection.url | |
$spweb = Get-SPWeb $SiteCollection.url |
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
$AccountList = @("Domain\UserOrGroup") | |
$webapp = Get-SPWebApplication -Identity https://webapplicationurl/ | |
foreach ($SiteCollection in $webapp.Sites) | |
{ | |
write-host $SiteCollection.url | |
$spweb = Get-SPWeb $SiteCollection.url | |
foreach ($Account in $AccountList) | |
{ |
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
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
_spBodyOnLoadFunctionNames.push("ready"); | |
function ready() | |
{ | |
$("h3.ms-standardheader:contains('Question')").closest("tr").hide(); | |
} | |
</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
<style type="text/css"> | |
#suiteBar{ | |
display:none; | |
} | |
#s4-ribbonrow{ | |
display:none; | |
} | |
#s4-titlerow{ | |
display:none !important; | |
} |
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
# Source https://technet.microsoft.com/en-us/library/jj862356.aspx | |
<# Specify the new servers you want to add search components to, start a search service instance (ssi) on these servers and | |
create references to the search service instances #> | |
$hostA = Get-SPEnterpriseSearchServiceInstance -Identity "PRDS0270" | |
$hostB = Get-SPEnterpriseSearchServiceInstance -Identity "PRDS0271" | |
$hostC = Get-SPEnterpriseSearchServiceInstance -Identity "PRDS0272" | |
$hostD = Get-SPEnterpriseSearchServiceInstance -Identity "PRDS0273" |
NewerOlder