Article archive

Simple ItemStyle.xslt

08/02/2013 13:00
Simple item style file, displays one hyperlink with link and description (url field as input)   <xsl:stylesheet   version="1.0"   exclude-result-prefixes="x d xsl msxsl cmswrt ddwrt"   xmlns:x="https://www.w3.org/2001/XMLSchema"  ...

Get site template by Powershell

08/02/2013 12:51
With these few lines you can find out, what site template is used by which site collection $webapp = Get-SPWebApplication -identity https://webapplicationUrl $webtem = Get-spwebtemplate #Get all site collections with publishing site template $webapp.Sites | Where-Object {(Get-SPWeb...

Sharepoint client object model in Powershell

05/02/2013 11:30
#Get data from public Sharepoint Site using Client Object Model # ================ Input parameters ========================== $siteUrl = "https://server/sitecollection" # ============== End of Input ================================ #Defining Load method for context, not accessible in...

Upload file to Sharepoint using client object model

04/02/2013 00:53
First add references to 'Microsoft.SharePoint.Client' and 'Microsoft.SharePoint.Client.Runtime' dll's. You can find them in 14\ISAPI folder if not in GAC. Help reference from:...

Zip folder with powershell

02/02/2013 05:51
Check if get-item is folder or file $file.PSIsContainer #property is true or false   #Zip folder  with files or directories   $installationFilesFolderPath = "c:\temp" #Note: if you use -Recurse in dir command, files will be there multiple times, don't use it here. dir...

Add custom style to CEWP

30/01/2013 13:08
Add custom style to Ribbon in Content Editor Web Part edit mode. It's about styles, not markup styles Link: https://sharepointroot.com/2010/05/28/adding-styles-to-ribbon-in-sharepoint-2010/ some more information: https://mosshowto.blogspot.sk/2009/12/sharepoint-2010-wiki-styles.html

Create Security group and set permissions for Sharepoint list

28/01/2013 12:45
Start-SPAssignment -Global #Get Site Groups $webUrl="https://server/sitecollection" $listToEdit=@("CustomList", "Pages") $groupName="Authors" $web = Get-SPWeb $webUrl #Create Group with Read permission level if($web.SiteGroups[$groupName] -eq $null) {  Write-Host "Creating $groupName group...

Create crawl rule

28/01/2013 12:43
#Creating crawl rule with specified account (for public site) $siteUrl="https://server/sitecollection" $crawlAccount="Cham\testaccount1" $password = "P@ssWord"; $crawlPath = $siteUrl.Replace("https", "http") + "/*" $searchapp = Get-SPEnterpriseSearchServiceApplication # check if crawl rule already...

Delete site collections with matching string

26/01/2013 00:51
param($matchingString, $matchingMonth) Add-PSSnapin Microsoft.SharePoint.PowerShell -ea 0 #USAGE: Call script without parameters to delete all site collections, with 1 or two parameters with matching string #e. g.  .\DeleteSiteCollections.ps1 (to delete all sites) #e. g. ...

Set default page layout for web

21/01/2013 17:38
$webUrl = "https://server/sitecollection/subsite" write-host "" write-host "=========================== starting 10.SetDefaultPageLayout.ps1 ==============================" Start-SPAssignment -Global $web = Get-SPWeb $webUrl $pweb =...
Items: 201 - 210 of 384
<< 19 | 20 | 21 | 22 | 23 >>