if ( (Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null ) { Add-PSSnapin Microsoft.SharePoint.PowerShell } $siteUrl = “http://34.231.97.77” $spWeb = Get-SPWeb $siteUrl -ErrorAction Stop #Declare the absolute path to the SharePoint page $pagePath = “/Default.aspx” $pageUrl =…
Replace Web part Instances in sharepoint Using Powershell
####Parameters $SqlServerInstance =”SQL Instance Name” ############# Start-Transcript -Append #region environment and deploy packages Write-Host “$(Get-Date -Format o) Getting Environment –” $SiteUrl=”http://localhost” <# if($args[0] -eq ‘Dev’) { $SiteUrl=”http://localhost” } elseif ($args[0] -eq…
Setup outgoing Email Configuration for SharePoint Using Powershell
Add-PSSnapin Microsoft.SharePoint.PowerShell $SMTPSvr = ‘smtprelay.domainname.com’ $FromAddr = ‘noreply@.domainname.com’ $ReplyAddr = ‘noreply@domainname.com’ $Charset = 65001 $CAWebApp = Get-SPWebApplication -IncludeCentralAdministration | Where { $_.IsAdministrationWebApplication } $CAWebApp.UpdateMailSettings($SMTPSvr, $FromAddr, $ReplyAddr, $Charset)
Useful SharePoint Development Tools
I will list out the list of tool available on the market free/paid , depends on the requirement, Please feel free comment out if i have missed any… Tool Used For SharePoint Manager The SharePoint Manager 2013 is a SharePoint object model…
SharePoint Wait Page
Using The Microsoft.SharePoint namespace provides the SPLongOperation class you can let the user to see the wait page till the operation gets completed. As this class implements the IDisposable interface, the best is to use a using statement like in the following example: void buttonProcess_Click(object sender, EventArgs e)…
Sharepoint MasterPage via HttpModule
If you would like to set the Sharepoint Master Page via HttpModule where no Publishing feature is activated and if you dont want to touch the system master pages. using System; using System.Web; using System.Web.UI; using System.IO; using System.Collections.Generic;…
Sharepoint Development Scopes for Features
Element Scope Description Content Type Site Contains a schema definition you can reuse and apply to multiple list definitions. Content Type Binding Site Content type binding enables you to provision a content type on a list defined in the Onet.xml…
Sharepoint 2010 Limitations and Boundaries
Web application limits The following table lists the recommended guidelines for Web applications. Limit Maximum value Limit type Notes Content database 300 per Web application Supported With 300 content databases per Web application, end user operations such as opening the…
Sorting SharePoint 2010 SPFolders and SPFiles
Sort SP Folders // folder is some SPFolder, e.g. SPList.RootFolder List spFolders = folder.SubFolders.Cast().ToList(); spFolders.Sort((f1, f2) => f1.Name.CompareTo(f2.Name)); foreach (SPFolder subFolder in spFolders) { // Your code here } Sort SP Files // folder is some SPFolder, e.g. SPList.RootFolder List…
SharePoint Powershell command to verify if the Outgoing Email Functions in Sharepoint Environment
$site = New-Object Microsoft.SharePoint.SpSite(“http://atlasdev/eastern”) $web = $site.OpenWeb() $sent = [Microsoft.Sharepoint.Utilities.SpUtility]::SendEmail($web,0,0,”admin@34.231.97.77″,”Test mail subject”,”test mail body”) $sent Running this command will come back with either true or false. If its true then the email will be delivered. If its false then the…