Posts

Showing posts from November, 2015

SharePoint download multiple files as zip

Image
After long googling i found the below solution to download multiple files as a zip. Its a custom solution    Download wsp from   here    Open SharePoint 2010 Management Shell (Run as Administrator)    Add the solution Add-SPSolution “\FilePath\”  Deploy the solution Install-SPSolution “Solution Name” –gacdeployment  Go to your Application site  Site Actions  à  Site Settings  à  Site collection features  à  DeviantPoint Download Zip Feature and activate this feature                      7. Now you can see new option called “Download as Zip” in Document Library ribbon. Source http://www.deviantpoint.com/post/2010/05/08/SharePoint-2010-Download-as-Zip-File-Custom-Ribbon-Action.aspx Wsp Available https://sites.google.com/site/memysharepoint/home/DeviantPoint.DownloadZip.wsp?attredirects=0&d=1 A complete solution available https://sites.google.com/site/memysharepoint/home/DeviantPoint.DownloadZip.zip?attredirects=0&d=1

Send an Email using SharePoint Provider Hosted Apps

Using MailMessage class MailMessage mail = new MailMessage( "from@mail.com" , "to@mail.com" ); SmtpClient client = new SmtpClient(); client.Port = 25; client.DeliveryMethod = SmtpDeliveryMethod.Network; client.UseDefaultCredentials = false ; client.Host = "smtp.google.com" ; mail.Subject = "this is a test subject." ; mail.Body = "this is my test body..." ; client.Send(mail); Using SharePoint Client Object Model (CSOM)    class var spContext = SharePointContextProvider.Current.GetSharePointContext(Context); using (var clientContext = spContext.CreateUserClientContextForSPHost()) { var emailp = new EmailProperties(); emailp.BCC = new List< string >{ "a@mail.com" }; emailp.To = new List< string >{ "b@mail.com" }; emailp= "from@mail.com" ; emailp.Body = "<b>Test html</b>" ; emailp.Subject = "Test subject" ;

Service Account Suggestions for SharePoint 2013

http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=391

How to RENAME SharePoint 2013 Site Collection

http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=573

SharePoint - Check the Site collection size using PowerShell

PS C:\> Get-SPSite | select url, @{label="Size in MB";Expression={$_.usage.storage/1MB}} | Sort-Object -Descending -Property "Size in MB" | Format-Table -AutoSize Url Size in MB --- ---------- http://my.contoso.com/personal/todd 49.2326898574829 http://sharepoint/sites/blob 34.5743083953857 http://sharepoint/sites/team 32.6884136199951 http://sharepoint 9.17551040649414 http://sharepoint/sites/portal 7.49533176422119 http://sharepoint/my/personal/todd 6.4399299621582 http://go.contoso.com 5.47069644927979 http://sharepoint/sites/Records 3.46581363677979 http://sharepoint/sites/Office_Viewing_Service_Cache 3.032565116882

PowerShell script for Fixing URLs in Content Editor WebPart - SharePoint 2010 & 2013

Hi All, Today i have faced one issue with my client Scenario Change the url in content editor WebPart in all the pages those having static content.  In my case i was having 600 pages :- Example : change the "http://www.google.com" to "http://www.company.com" Please find the below script to achieve the above Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue $OldLink="http://www.google.com" $NewLink="http://kannansharepointworld.blogspot.com" #Get all Webs #$webs = Get-SPWebApplication "http://sharepoint2010:2015/" | Get-SPSite -Limit All | Get-SPWeb -Limit All $webs = Get-SPSite "http://sharepoint2010:2015/" | Get-SPWeb -Limit All #Iterate through webs foreach ($web in $webs) { #Get All Pages from site's Root into $AllPages Array $AllPages = @($web.Files | Where-Object {$_.Name -match ".aspx"}) #Search All Folders for Pages foreach ($folder in $web.Folders)

Install-SPEnterpriseSearchService

https://gallery.technet.microsoft.com/scriptcenter/Install-SPEnterpriseSearchS-bca44f07

How to Create SharePoint Document Library Using PowerShell

https://gallery.technet.microsoft.com/scriptcenter/How-to-Create-SharePoint-b9375f6d

How to change SharePoint Farm PassPhrase

https://gallery.technet.microsoft.com/scriptcenter/How-to-change-SharePint-6b4ea595