Download All Files in a SharePoint Document Library using PowerShell

May 31, 2018    , , , ,
Requirement: Download all files in document library in SharePoint Download All Documents in a Library using PowerShell: Here is the PowerShell to download all files in a document library.  Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Function to Download All Files from a SharePoint Folder Function Download-SPFolder($SPFolderURL, $DownloadPath) { Try { #Get the Source SharePoint Folder $SPFolder = $web.GetFolder($SPFolderURL) $DownloadPath = Join-Path $DownloadPath $SPFolder.Name #Ensure the destination local folder exists! If (!(Test-Path -path $DownloadPath)) { #If it doesn't exists, Create $LocalFolder = New-Item $DownloadPath -type directory } #Loop through each file in the folder and download it to Destination ForEach ($File in $SPFolder.Files) { #Download the file $Data = $File.OpenBinary()
Download All Files in a SharePoint Document Library using PowerShell Download All Files in a SharePoint Document Library using PowerShell Reviewed by Salaudeen Rajack on May 31, 2018 Rating: 5

PowerShell to Delete All Files in SharePoint Document Library

May 31, 2018    , , ,
Requirement: Delete All Files in SharePoint Document Library using PowerShell SharePoint PowerShell to Delete All Documents Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Function to Delete all files in a Folder Function Delete-AllFilesFromLibrary([Microsoft.SharePoint.SPFolder]$Folder) { #Delete All Files in the Folder Foreach ($File in @($Folder.Files)) { #Delete the file $File.Recycle() | Out-Null Write-host -f Green "Deleted File '$($File.Name)' from '$($File.ServerRelativeURL)'" } #Delete files in Sub-folders Foreach ($SubFolder in $Folder.SubFolders | where {$_.Name -ne "Forms"}) { #Call the function recursively Delete-AllFilesFromLibrary($SubFolder) } } #Get the Web and Library $Web = Get-SPWeb "http://intranet.crescent.com/sales" $Library = $Web.Lists.TryGetList("Documents") #Call the function to Delete all
PowerShell to Delete All Files in SharePoint Document Library PowerShell to Delete All Files in SharePoint Document Library Reviewed by Salaudeen Rajack on May 31, 2018 Rating: 5

SharePoint Online: Get Email, Display Name, Login ID from "Created By" Column in PowerShell

May 30, 2018    , , ,
Requirement: Get User Name, Email, Login ID, etc from "Created By" field value of a List Item using PowerShell PowerShell to Retrieve User Object from "Created By" Field: #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Variables for Processing $SiteURL = "https://crescenttech.sharepoint.com/sites/marketing" $ListName = "Projects" $ItemID = "1" #Get Credentials to connect $Cred = Get-Credential Try { #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Get the List Item $List = $Ctx.Web.Lists.G
SharePoint Online: Get Email, Display Name, Login ID from "Created By" Column in PowerShell SharePoint Online: Get Email, Display Name, Login ID from "Created By" Column in PowerShell Reviewed by Salaudeen Rajack on May 30, 2018 Rating: 5

SharePoint Online: PowerShell to Get List URL

May 29, 2018    , , ,
Requirement: PowerShell to Get SharePoint Online List URL SharePoint Online PowerShell to Get List URL Here is how to get list URL in SharePoint Online with PowerShell: #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Variables for Processing $SiteURL = "https://crescenttech.sharepoint.com/sites/marketing" $ListName = "Documents" #Get Credentials to connect $Cred = Get-Credential $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = $Credentials #Get the Web and List Objects $Web = $Ctx.Web $Ctx.Load($Web) $List = $Web.Lists.GetBy
SharePoint Online: PowerShell to Get List URL SharePoint Online: PowerShell to Get List URL Reviewed by Salaudeen Rajack on May 29, 2018 Rating: 5

SharePoint Online: Delete All Files in a Document Library using PowerShell

May 28, 2018    , , , , ,
Requirement: Delete all documents in library in SharePoint Online How to Delete All Documents in Library in SharePoint Online? At times you may want to delete multiple documents all at once. You can delete multiple files, folders and sub-folders from a SharePoint Online document library in few clicks: Navigate to your SharePoint Online document library in browser, hover over header and click the check mark to select all files. Click on "Delete" button on the top link bar.  In the Delete dialog box, confirm the delete by clicking "Delete" button You'll find the little status box appear in the upper top of the document library telling you that the item has been deleted. Once all items are deleted from the document library, and the view is updated. The deleted files are moved to the site's recycle bin. Tips: You can also use Explorer view to delete multiple files! Go to the library >> Click on "Open with Explorer" option from
SharePoint Online: Delete All Files in a Document Library using PowerShell SharePoint Online: Delete All Files in a Document Library using PowerShell Reviewed by Salaudeen Rajack on May 28, 2018 Rating: 5

SharePoint Online: Delete Version History using PnP PowerShell

May 28, 2018    , , ,
Requirement: Delete version history in SharePoint Online. How to Delete versions in SharePoint Online? To delete previous versions of a file in SharePoint Online, follow these steps: Navigate to your SharePoint Online document library, Select the file and then click on "Version History" from the toolbar. (or Select "Version History" from the context menu of the document) On the version history page, You can choose "Delete" from the context menu of the particular version. To delete all versions of a document or list item, in the Version history page, click the "Delete All Versions" link, and then confirm the prompt. SharePoint Online: Delete Version History using PnP PowerShell Lets delete all versions of all items in a list or library using PowerShell. #Config Variables $SiteURL = "https://crescenttech.sharepoint.com/sites/marketing" $ListName="Documents" #Connect to PnP Online Connect-PnPOnline -Url $SiteURL -Cred
SharePoint Online: Delete Version History using PnP PowerShell SharePoint Online: Delete Version History using PnP PowerShell Reviewed by Salaudeen Rajack on May 28, 2018 Rating: 5

SharePoint Online: How to Create Chart from List Data using Quick Chart Web Part?

May 27, 2018    ,
Requirement: Create Chart from List data in SharePoint Online Here is my SharePoint Online list data: How to Create Quick Chart from List Data in SharePoint Online? In Modern SharePoint Online sites, we can use Quick chart web part to build bar chart or pie chart from list data. Here is how to use Quick chart web part to create chart from list. In your Modern SharePoint Online site, create new page or edit an existing page. Click on "+" icon to add a Web Part. In web parts popup, search "Quick chart" and you'll find Quick chart web Part as in the below screen. Click on the "Quick Chart" web part to add it to the page. Once added, Click on the pencil icon in the quick chart web part area. This opens web part properties in edit mode.  Select chart type: either "Column" or "Pie". Specify the option to get the data from the SharePoint list.  Select the SharePoint list where the chart data resides. Specify the columns f
SharePoint Online: How to Create Chart from List Data using Quick Chart Web Part? SharePoint Online: How to Create Chart from List Data using Quick Chart Web Part? Reviewed by Salaudeen Rajack on May 27, 2018 Rating: 5

How to Display Charts in SharePoint using Excel Web Access Web Part?

May 27, 2018    , , , ,
Requirement: Display Excel Chart in SharePoint Online How to Show Excel Charts & Graphs in SharePoint Online using Excel Web Access Web Part?  Excel Web Access web part in SharePoint Online can be used to display charts. To display the Excel sheet with charts in SharePoint: Create an Excel sheet with Chart data, Select the chart and data area in your spreadsheet, give it a name. E.g. "ChartData" Upload the spreadsheet to any document library in your SharePoint site. Now, add a web part page to display the Excel sheet. Here is how: Go to your SharePoint Online Site in browser >> Site Contents >> Pages Library Create new Web Part Page and insert a web part Under "Business Data" category,  Select "Excel Web Access" web part and Click on "Add" Now, Edit web part properties of the Excel web access >> Browse and select the spreadsheet from your document library. Enter the "Named Item" you created in the spr
How to Display Charts in SharePoint using Excel Web Access Web Part? How to Display Charts in SharePoint using Excel Web Access Web Part? Reviewed by Salaudeen Rajack on May 27, 2018 Rating: 5

Excel Web Access Web Part Missing in SharePoint Online?

May 27, 2018    , , , ,
Problem:  Excel Web Access Web Part Missing in SharePoint Online Fix: Excel Web Access is available only in SharePoint Enterprise edition (and in Office 365, Its only available on the Enterprise Plans E3 and E4). If you are using Enterprise edition, Make sure you have "Enterprise Site Collection Features" enabled. Here is how to turn it ON. Go to Site Settings using the gear icon on the top right Click on Site Collection Features Click on "Activate" button next to "SharePoint Server Enterprise Site Collection Features" to enable the feature. This enables Excel Access Web Part under "Business Data" group:
Excel Web Access Web Part Missing in SharePoint Online? Excel Web Access Web Part Missing in SharePoint Online? Reviewed by Salaudeen Rajack on May 27, 2018 Rating: 5

Add Members to Office 365 Group using PowerShell

May 26, 2018    ,
Requirement: Add members to office 365 group using PowerShell Add user to Office 365 Group using Admin Center: As an admin, you can add members to any Office 365 group through Microsoft 365 admin center. Here is how: Login to the Microsoft 365 Admin Center site: https://admin.microsoft.com Expand Groups and Click on Groups link in the left navigation.  Select the Office 365 group you wish to add members Click on Edit link next to Members column in the details pane. On the Group page, Click on Add Members button >> Search and select users you wish to add to the group. You can find and add multiple users in a single stretch. Click on "Save" once you are done! You'll see "Group membership was updated and will take effect immediately." message. How to Add Users to Office 365 Group using PowerShell? Let's add "John@TheCrescentTech.com" to "Accounts@TheCrescentTech.com" Office 365 group using PowerShell. #Get Creden
Add Members to Office 365 Group using PowerShell Add Members to Office 365 Group using PowerShell Reviewed by Salaudeen Rajack on May 26, 2018 Rating: 5

Set Office 365 Group Privacy to Private or Public using PowerShell

May 26, 2018    ,
Requirement: Change Office 365 Group Privacy to Private or Public How to Change Office 365 Group Privacy? As an admin, you can change the Office 365 group's privacy through Microsoft 365 admin center. Here is how: Login to the Microsoft 365 Admin Center site: https://admin.microsoft.com Expand Groups and Click on Groups link in the left navigation.  Select the Office 365 group you wish to rename Click on Edit link next to Name column in the details pane. On the Edit page, You can change the Privacy of the Office 365 group by selecting Private or Public from the drop down.  Click on "Save" to commit your changes. You should see " The group was updated." message. Set Office 365 Group Privacy to Private or Public using PowerShell: Lets change the privacy of "Accounts@TheCrescentTech.com" group to "Private". #Get Credentials to connect $Credential = Get-Credential #Create the session $Session = New-PSSession -Conf
Set Office 365 Group Privacy to Private or Public using PowerShell Set Office 365 Group Privacy to Private or Public using PowerShell Reviewed by Salaudeen Rajack on May 26, 2018 Rating: 5

Change Office 365 Group Email Address using PowerShell

May 26, 2018    ,
Requirement: Change Office 365 Group Email using PowerShell How to Change Office 365 Group Email Address? If you want to change the Email address of a Office 365 group, its not possible through Office 365 admin center! But we can change Office 365 group Email using PowerShell Office 365 Group: Change Email Address using PowerShell Lets change the Email of an Office 365 group: External Vendors Group to "ExternalVendors@TheCrescentTech.com" #Get Credentials to connect $Credential = Get-Credential #Create the session $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ ` -Credential $Credential -Authentication Basic -AllowRedirection #Import the session Import-PSSession $Session -DisableNameChecking #office 365 powershell change group email address Set-UnifiedGroup -Identity "External Vendors Group" -PrimarySmtpAddress "ExternalVendors@TheCrescentTech.com"
Change Office 365 Group Email Address using PowerShell Change Office 365 Group Email Address using PowerShell Reviewed by Salaudeen Rajack on May 26, 2018 Rating: 5

Hide Office 365 Group from GAL using PowerShell

May 24, 2018    ,
Requirement: Hide Office 365 Group from GAL (Global Address List) How to Hide Office 365 Group from GAL using PowerShell? If you don't wish your Office 365 group appears in the global address list (GAL), you can hide it from appearing in GAL using Set-UnifiedGroup cmdlet. Here is how to hide the group from address list: #Get Credentials to connect $Credential = Get-Credential #Create the session $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ ` -Credential $Credential -Authentication Basic -AllowRedirection #Import the session Import-PSSession $Session -DisableNameChecking #hide office 365 group from gal using powershell Set-UnifiedGroup -Identity "Vendors@TheCrescentTech.com" -HiddenFromAddressListsEnabled $True #Remove the session Remove-PSSession $Session This PowerShell hides Office 365 Group from GAL. Similarly, You can hide Office 365 group from Exchange clients u
Hide Office 365 Group from GAL using PowerShell Hide Office 365 Group from GAL using PowerShell Reviewed by Salaudeen Rajack on May 24, 2018 Rating: 5

How to Change Office 365 Group Name using PowerShell?

May 24, 2018    ,
Requirement: Change Office 365 Group Name using PowerShell How to change Office 365 Group Name using Admin Center? As an admin, you can rename Office 365 groups through Microsoft 365 admin center. Here is how: Login to the Microsoft 365 Admin Center site: https://admin.microsoft.com Expand Groups and Click on Groups link in the left navigation.  Select the Office 365 group you wish to rename Click on "Edit" link next to "Name" column in the details pane. On the Edit page, You can change the Office 365 group name and click on "Save" to commit your changes. Rename Office 365 Group using PowerShell You can change the name of any Office 365 group using Set-UnifiedGroup cmdlet. E.g: Set-UnifiedGroup -Identity "group@tenant.com" -DisplayName "New group Name" #Get Credentials to connect $Credential = Get-Credential #Create the session $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outl
How to Change Office 365 Group Name using PowerShell? How to Change Office 365 Group Name using PowerShell? Reviewed by Salaudeen Rajack on May 24, 2018 Rating: 5

How to Recover a Deleted Office 365 Group using PowerShell?

May 23, 2018    ,
Requirement: Recover Deleted Office 365 Group via PowerShell Prerequisites: You need to have "Azure AD 2.0" module installed in your machine. You can check if you have azure AD module installed by: Get-InstalledModule . If you have any previous versions  installed, You may have to uninstall using " Uninstall-Module AzureAD " and then install the latest version using " Install-Module AzureAD " cmdlet. How to Recover Office 365 Group using Exchange Admin Center? Office 365 groups may get deleted accidentally. Luckily we've methods available to recover deleted groups! If you've deleted an Office 365 group, it's retained for 30 days. After 30 days, the group and associated content is permanently deleted and cannot be restored. Login to Office 365 Admin center https://admin.microsoft.com   In the left navigation, expand "Admin Center" and then Click on "Exchange" In the Exchange admin center, under "Recipien
How to Recover a Deleted Office 365 Group using PowerShell? How to Recover a Deleted Office 365 Group using PowerShell? Reviewed by Salaudeen Rajack on May 23, 2018 Rating: 5

How to Create a Office 365 Group using PowerShell?

May 21, 2018    ,
Requirement: Create New Office 365 Group using PowerShell How to Create an Office 365 Group in the Admin Center? As an admin, you can create office 365 groups through Microsoft 365 admin center. Login to the Microsoft 365 Admin Center site: https://admin.microsoft.com Expand Groups and Click on Groups in the left navigation. Click on "Add a Group" >> Select "Office 365" under Type.  Provide a name for the group and unique email address for the group. Specify the privacy type for the Office 365 Group. Click on "Select Owner" button and choose the owner to manage the group Click on "Add" to start creating the Office 365 group. Once we've created a group, all related resources such as Shared mail box, Calendar, SharePoint Site, etc gets provisioned automatically. Let's see how to create office 365 group via PowerShell. How to Create Office 365 Group using PowerShell? Creating Office 365 group through PowerShell all
How to Create a Office 365 Group using PowerShell? How to Create a Office 365 Group using PowerShell? Reviewed by Salaudeen Rajack on May 21, 2018 Rating: 5

Get URL of All Files in SharePoint Online Document Library using PowerShell

May 08, 2018    , , , ,
Requirement: Get the URL of All Files in a SharePoint Online Document Library using PowerShell Get URLs of All Files in a SharePoint Online Document Library using PowerShell CSOM #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Set Variables $SiteURL= "https://crescent.sharepoint.com/sites/Marketing" $ListName="Documents" #Setup Credentials to connect $Cred = Get-Credential Try { #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password) #Get the Web $Web = $Ctx.Web $Ctx.Load($Web) $Ctx.ExecuteQuery() #Get All
Get URL of All Files in SharePoint Online Document Library using PowerShell Get URL of All Files in SharePoint Online Document Library using PowerShell Reviewed by Salaudeen Rajack on May 08, 2018 Rating: 5

SharePoint Online: Terminate Workflow using PowerShell

May 08, 2018    , , ,
Requirement: Stop workflow in SharePoint Online using PowerShell SharePoint Online: PowerShell to Cancel Workflow Lets terminate all workflow instances of a specific workflow in all items of a list using PowerShell. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.WorkflowServices.dll" #Set Parameters $SiteURL="https://crescenttech.sharepoint.com" $ListName ="Project Tasks" $WorkflowName ="Send Email" #Get Credentials to connect $Cred= Get-Credential Try{ #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $
SharePoint Online: Terminate Workflow using PowerShell SharePoint Online: Terminate Workflow using PowerShell Reviewed by Salaudeen Rajack on May 08, 2018 Rating: 5

SharePoint Online: Start Workflow on All Items in a List using PowerShell

May 07, 2018    , , , ,
Requirement: Run Workflow in SharePoint Online using PowerShell SharePoint Online: PowerShell to Start Workflow This PowerShell script starts given workflow on all items in a SharePoint Online list. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.WorkflowServices.dll" #Set Parameters $SiteURL="https://crescenttech.sharepoint.com/Sites/PMO" $ListName ="Project Tasks" $WorkflowName ="Send Approval Email" #Get Credentials to connect $Cred= Get-Credential Try{ #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
SharePoint Online: Start Workflow on All Items in a List using PowerShell SharePoint Online: Start Workflow on All Items in a List using PowerShell Reviewed by Salaudeen Rajack on May 07, 2018 Rating: 5

SharePoint Online: Get Workflow Inventory using PowerShell

May 07, 2018    , , , ,
Requirement: Find all workflows in a SharePoint Online site collection and export the workflow inventory to CSV report. PowerShell to Export Workflow Inventory in SharePoint Online: This scripts gets all workflows from all lists and libraries from a given SharePoint Online site collection and export the workflow data into a CSV file. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" Add-Type -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.WorkflowServices.dll" #Function to Get workflows in a site Function Get-SPOWorkflowInventory($SiteURL, $CSVPath) { Try{ $WorkflowInventory = @() #Setup the context $Ctx = New-Object
SharePoint Online: Get Workflow Inventory using PowerShell SharePoint Online: Get Workflow Inventory using PowerShell Reviewed by Salaudeen Rajack on May 07, 2018 Rating: 5

Delete Office 365 Group Site Collection using PowerShell

May 06, 2018    , ,
Requirement: Delete office 365 group-connected site collection. How to Delete Office 365 Group Site? When you delete an Office 365 group, its associated team site gets deleted automatically (However, It takes a while up to 30 min to delete connected SharePoint Online site and clear it from "Active Sites" list in SharePoint Online Admin Center, in my experience!). Even when the group is deleted permanently or reaches 30 days from deletion, its SharePoint site waits for 92 days retention period before purged from recycle bin. So, How to delete Office 365 group sites immediately? PowerShell to Delete Office 365 Group Site Collection What if you delete an Office 365 group and the connected SharePoint Site doesn't get Deleted even after hours of waiting? #Parameters $AdminCenterURL="https://CrescentTech-Admin.SharePoint.com" $GroupSiteURL="https://CrescentTech.SharePoint.com/sites/customers" $OwnerLoginID = "Salaudeen@TheCrescentTech.com"
Delete Office 365 Group Site Collection using PowerShell Delete Office 365 Group Site Collection using PowerShell Reviewed by Salaudeen Rajack on May 06, 2018 Rating: 5

SharePoint Online: Import Excel File Data Into Existing List using PowerShell

May 04, 2018    ,
Requirement: Import Data from Excel file into existing SharePoint Online List SharePoint Online: Import Excel to Existing List using PowerShell While my another post describes on importing data from a CSV file to SharePoint Online list, this script targeting importing the .XSLX file into existing SharePoint Online list.  Please make sure the data is in right format! E.g. Date column should be in "dd/mm/yyyy" format. PowerShell to Import Excel Data into Existing SharePoint Online List Lets import task list from excel  to SharePoint Online using PowerShell #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll" Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll" #Config Variables $SiteURL="https://crescent.sharepoint.com/sites/marketing" $ListName=&quo
SharePoint Online: Import Excel File Data Into Existing List using PowerShell SharePoint Online: Import Excel File Data Into Existing List using PowerShell Reviewed by Salaudeen Rajack on May 04, 2018 Rating: 5

Get User SID in SharePoint using PowerShell

May 04, 2018    , , , ,
What is SID ? Security identifier (SID) is the primary key for security principals such as user, computer, group, etc in an Active Directory. The Active Directory generates the SID that identifies a particular object and the SID is unique to a domain. In active directory, users are referred by the account name, but the operating system internally refers to account by their SIDs. SharePoint relies on this unique, immutable identifier, as any other attribute can be renamed. Services like user profile sync uses SID to sync information from AD to SharePoint. Get User SID in SharePoint using PowerShell: To check user SID in SharePoint, use this PowerShell script Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #config Variables $SiteURL="https://opera.crescent.com" $UserAccount = "crescent\salaudeen" #Get the Web and User Objects $Web = Get-SPWeb $SiteURL $User = $web.EnsureUser($UserAccount) #Get the SID Write-host "SID of the U
Get User SID in SharePoint using PowerShell Get User SID in SharePoint using PowerShell Reviewed by Salaudeen Rajack on May 04, 2018 Rating: 5

Limit Search Results to a Specific Content Source in SharePoint 2016

May 03, 2018    , ,
Requirement:   HR team wants to setup a dedicated search portal to search a confidential file share. If its SharePoint 2010, we would have created a search scope and added rules to include only that specific content source to it. Now from SharePoint 2013 on wards search scopes has been replaced by result sources. So, lets see how to create a result source to limit search results only from a specific content source in SharePoint 2016. Before starting, I've following things configured already: A content source is created to index the specific file share with name "HR FileShare". Full crawl has been completed already. There is a subsite created with "Basic Search center" template to server as a dedicated search center. How to setup Search Result Source to Limit results to a Content Source? Result Sources can be created on three different levels: Search Service Application, Site collection and Site. For our requirement, lets create it at site level. Here
Limit Search Results to a Specific Content Source in SharePoint 2016 Limit Search Results to a Specific Content Source in SharePoint 2016 Reviewed by Salaudeen Rajack on May 03, 2018 Rating: 5
Powered by Blogger.