Posts

Showing posts from 2015

What’s new - “Sharing” in SharePoint 2016

Image
Sharing - In addition to files, Now users can Share Folder as well in the SP 2016. The Sharing can be done by using Sharing button. Also there will be option to invite people in the Folder creating window. Some screen shots are provided below. Just look at those and you will come to know this amazing feature provided by Microsoft. Click Invite People if you get any error as below To enable sharing disable the limited access lockdown mode feature on the site features page Then deactivate the feature. To know  the folder shared with whom, then go to modify view and add the "Shared With" column into list view. List default view Original Source :  http://www.learningsharepoint.com/2015/10/27/whats-new-with-sharing-in-sharepoint-2016/ 

Create and Configure SQL Server Alias for SharePoint Installation

https://codecreature.wordpress.com/2014/08/11/create-and-configure-sql-server-instance-and-alias-for-sharepoint-installation/ 

Export all documents/Folders permissions to CSV using SharePoint PowerShell

$ver = $host | select version if($Ver.version.major -gt 1) {$Host.Runspace.ThreadOptions = "ReuseThread"} if(!(Get-PSSnapin Microsoft.SharePoint.PowerShell -ea 0)) { Write-Progress -Activity "Loading Modules" -Status "Loading Microsoft.SharePoint.PowerShell" Add-PSSnapin Microsoft.SharePoint.PowerShell } #Get the Site collection $Site= Get-SPSite http://SiteURL $outputPath = "c:\Permission.csv" Function GetMyFiles($Folder) {     Write-Host "+in : "$Folder.Name     foreach($file in $Folder.Files)     {         Write-Host "'t" $file.Name         Add-Content -Path $outputPath -Value  "                     File Name : $($file.Name)"         # $file.Item.RoleAssignments -fore yellow         Add-Content -Path $outputPath -Value "                              Permission for the list item"         foreach ($role in $file.Item.RoleAssignments)         {            $users = $role.membe

Get All AD users details using PowerShell and Export results as CSV

Today i have faced one scenario to export all the users details to Excel/CSV thru PowerShell. Use the below script for the above scenaio Add-PSSnapin "Microsoft.SharePoint.PowerShell" [ Reflection.Assembly ]:: LoadWithPartialName( "Microsoft.Office.Server" ) $userProfiles = @() $mysiteHostUrl = " http://SitteURL/my " $mysite = Get-SPSite $mysiteHostUrl $context = [ Microsoft.Office.Server.ServerContext ]:: GetContext( $mysite ) $upm =   New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager ( $context ) $AllProfiles = $upm . GetEnumerator() foreach ( $profile in $AllProfiles ) {     write-host $profile [ "AccountName" ]. Value     $profileObject = New-Object PSObject     $profileObject | Add-Member -MemberType NoteProperty -Name "Display Name" -Value $profile . DisplayName     $profileObject | Add-Member -MemberType NoteProperty -Name "Accoun

SharePoint Delete files with and without conditions using PowerShell

The below PowerShell script you can use to delete the files in the document library $web = Get-SPWeb "SiteURL" $Libraries = $web.Lists | where {$_.BaseType -eq "DocumentLibrary"} foreach ($library in $Libraries) {     Write-Output "Getting files from $($library.Title)"     $Files = $library.Items | where {$_.FileSystemObjectType -eq "File"}     foreach ($file in $Files) {         Write-Output "Deleting file $($file.Name)..."         $file.Delete()     } } Conditions 1 $Files = $library.Items | where {$_.FileSystemObjectType -eq "File" -And ($_.File -Like "*.docx" -Or $_.File -Like "*.docm" -Or $_.File -Like "*.doc")} Condition 2 $Libraries = $web.Lists | where {$_.BaseType -eq "DocumentLibrary" -And $_.Title -eq "Resumes"}

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

What's New in SharePoint 2016: Features Overview

http://en.share-gate.com/blog/whats-new-in-sharepoint-2016

Power BI - Overview and Learning

https://support.office.com/en-us/article/Power-BI-Overview-and-Learning-02730e00-5c8c-4fe4-9d77-46b955b71467

sharepoint 2010 and one way trusts - it works fine!

http://www.pointbeyond.com/2012/06/08/sharepoint-2010-and-one-way-trusts-it-works-fine/

Supporting Multiple Active Directory Domains

http://mikeoryszak.com/2009/05/supporting-multiple-active-directory-domains/ 

SharePoint 2013 App Development Catches

Error occurred in deployment step 'Uninstall app for SharePoint': Cannot connect to the SharePoint site Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project Development Catches Can’t deploy app from VS 2012 using system account Need to give the new account DBO in the following SharePoint database Config Content DB for the Developer site collection App management service application DB So, my problem was that the account I used doesn't have DBO access to the content DB.  I used the following script on the SharePoint server and everything works fine ... Get-SPDatabase Add-SPShellAdmin -database {id} -username 

SharePoint 2013 - Display Notification on Parent Page after App Part completes its task

For a typical web part operation, you usually display some kind of message/notification when you completed a task.  So that user know the status.  The problem with the App part is that it's within an iFrame on the page.  You can't just call SP.UI.Notify.addNotification(""). The OOTB App Part support resizing of iFrame with postMessage technique only.  So, what to do ... Below is a technique that allows you to display the SharePoint popup notification on the top right corner of the parent page.  The code below is tested using JavaScript and C# in a provider-hosted app.  The basic components are as follow You have to register a custom event listener for the message event on the SharePoint page.  You can register this event on the master page so that all your App Parts can utilize the event handler You have JavaScript function that post message back to the parent On your App part post back event, you call the JavaScript to post the message back to the parent.

SharePoint Server 2016 Preview

Please click the below link to get the SharePoint 2016 Preview http://www.microsoft.com/en-us/download/details.aspx?id=48712

Announcing availability of SharePoint Server 2016 IT Preview and cloud hybrid search

https://blogs.office.com/2015/08/24/announcing-availability-of-sharepoint-server-2016-it-preview-and-cloud-hybrid-search/

SharePoint Server 2016 Installation step by step

Image
 SharePoint 2016   SharePoint Server 2016   Preview has been released earlier today, check my   previous post for Download and Product Key details , installation media is available for a trial period of 180 days. I have completed a Single-Server installation of SharePoint Server 2016 with Database server on a separate machine. I am sharing the installation details here which can be helpful for many who are new to SharePoint. The installation is similar to the older versions of SharePoint except MinRoleTopolgy which is introduced for the first time in SharePoint 2016. System Requirement I have used the below hardware and software configuration form my current installation. Hardware Requirement Scenario Processor RAM Hard disk Database Server 64-bit, 4 cores 8-24 GB 80 GB for system drive100 GB for second drive and additional drives SharePoint Server 64-bit, 4 cores 8-12 GB 80 GB for system drive80 GB for second drive Software Details: Server OS Installation media D