Posts

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 "                       ...

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...

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 avai...

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" ; ...