Posts

Showing posts from December, 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"}