kwizcom banner advertisement

Find All OneDrive Site Collections in SharePoint Online using PowerShell

7:51 PM    , , , ,
Requirement: Get a list of all OneDrive site collections from SharePoint Online. I was asked to get the list of all OneDrive sites to get the usage of OneDrive for Business in our Office 365 tenant. Its bit tricky to find all of your OneDrive site collections and here is how I achieved using Get-SPOSite cmdlet: Find All OneDrive Sites using SharePoint Online Management Shell: Here is the PowerShell script to get all OneDrive site collections in SharePoint Online. $AdminSiteURL="https://crescent-admin.sharepoint.com" #Get Credentials to connect to SharePoint Admin Center $Cred = Get-Credential #Connect to SharePoint Online Admin Center Connect-SPOService -Url $AdminSiteURL –credential $Cred #Get all Personal Site collections and export to a Text file Get-SPOSite -Template "SPSPERS#9" -limit ALL -includepersonalsite $True | Select URL, Owner | Format-table -autosize | Out-string -width 8096 | Out-file C:\temp\OneDriveSites.txt Just change the $AdminSiteURL
Find All OneDrive Site Collections in SharePoint Online using PowerShell Find All OneDrive Site Collections in SharePoint Online using PowerShell Reviewed by Salaudeen Rajack on 7:51 PM Rating: 5

SharePoint Online: Export List Version History to Excel using PowerShell

2:51 PM    , , , , ,
Requirement: Export all versions of SharePoint Online List Items to CSV (Excel) file. PowerShell to Extract and Export List Item's Version History to 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" Function Export-VersionHistory() { param ( [Parameter(Mandatory=$true)] [string] $SiteURL, [Parameter(Mandatory=$true)] [string] $ListName, [Parameter(Mandatory=$true)] [string] $CSVFile ) Try { #Delete the Output report file if exists if (Test-Path $CSVFile) { Remove-Item $CSVFile } #Get Credentials to connect $Cred= Get-Credential $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $C
SharePoint Online: Export List Version History to Excel using PowerShell SharePoint Online: Export List Version History to Excel using PowerShell Reviewed by Salaudeen Rajack on 2:51 PM Rating: 5

SharePoint Online: Find and Delete Orphaned Users using PowerShell

4:45 PM    , , , ,
What is "Orphaned Users" in SharePoint Online? In short, Orphaned users are those who deleted from the authentication provider (such as removed from Active Directory when user leaves the organization), and still continue to exist in SharePoint online sites! scanning each user in SharePoint online site collection for orphaned users could take days to complete! Since, Here is my PowerShell script to search for orphan users and delete them. Pr-Requisites: Before using this script, you need to have SharePoint Online Management Shell ( https://www.microsoft.com/en-us/download/details.aspx?id=35588 ) and Azure Active Directory Module ( https://technet.microsoft.com/en-us/library/dn975125.aspx ) installed on your machine! Find Orphan Users in SharePoint Online using PowerShell: This script scans each and every user from the given site collection URL and exports list of orphaned users to a CSV file. #Import SharePoint Online and Azure Online modules Import-Module Micro
SharePoint Online: Find and Delete Orphaned Users using PowerShell SharePoint Online: Find and Delete Orphaned Users using PowerShell Reviewed by Salaudeen Rajack on 4:45 PM Rating: 5

SharePoint Online: Add Site Column to List using PowerShell

3:42 AM    , , , ,
Requirement: Add an existing site column to SharePoint list or library using PowerShell. How to Add a Site Column to SharePoint Online List? Site columns in SharePoint provides great re-usability without having to recreate same columns multiple times! Once created at top level site, we can utilize them to store metadata in any number of lists and libraries under the hierarchy. To add a site column to SharePoint list, follow these steps: Go to List Settings >> Under Columns, Click on "Add from existing site columns" link. From the available site columns, pick the required site column(s) and click on Add button. Click OK to save your changes. Add Site Column to List or Library 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\
SharePoint Online: Add Site Column to List using PowerShell SharePoint Online: Add Site Column to List using PowerShell Reviewed by Salaudeen Rajack on 3:42 AM Rating: 5

How to Add a Custom Tile to SharePoint 2016 App Launcher

1:50 PM    ,
Requirement: Add new tile to App Launcher in SharePoint Online. How to Add a Custom Tile to SharePoint 2016 App Launcher? We wanted to place a new tile in SharePoint 2016 app launcher for support center site, as an end-user usability improvement. SharePoint 2016 Feature Pack 1 brought us the capability to add new tile to app launcher. Here is how you can customize SharePoint 2016 App launcher. Step 1: Enable the "Custom Tiles" feature in SharePoint 2016 with PowerShell: Use this PowerShell script to enable custom tiles feature.  Enable-SPFeature -Identity CustomTiles -Url "http://intranet.crescent.com" -Force This creates a new list "Custom Tiles" in the given web application's root site collection. Step 2: Create new Tile in "Custom Tiles" list Once the feature is activated, navigate to: http://intranet.crescent.com/Lists/Custom%20Tiles/AllItems.aspx URL and add a new entry with desired URL and image for tile for your custom t
How to Add a Custom Tile to SharePoint 2016 App Launcher How to Add a Custom Tile to SharePoint 2016 App Launcher Reviewed by Salaudeen Rajack on 1:50 PM Rating: 5

SharePoint Online: Grant Permission to List Item using PowerShell

7:03 PM    , , ,
Permissions are hierarchical in SharePoint from Top Site collection till the List Item level. To set unique permissions on list items, you need to configure permissions on item level. Here is how: How to Grant Access to Individual List Items in SharePoint Online? Got a business requirement to grant permissions at List item level. To set explicit permissions on SharePoint online list items, we need to break the permission inheritance first (stop inheriting permissions) and then add user or group to the List Item. Go to your SharePoint Online list or library >> Select the Item to which you want to provide unique permissions.  Click on "Shared With" button from the ribbon. On the Shared With page, click Advanced. On the Permissions tab, in the Inheritance group, click Stop Inheriting Permissions button. Confirm the prompt. Now, from the ribbon, click on "Grant Permissions." button. In the Share dialog box, enter names, email addresses. Click the Show
SharePoint Online: Grant Permission to List Item using PowerShell SharePoint Online: Grant Permission to List Item using PowerShell Reviewed by Salaudeen Rajack on 7:03 PM Rating: 5

Create Search Service Application in SharePoint 2016 Multi-Server Farm using PowerShell

3:02 PM    , , , ,
The Search Service Application in SharePoint provides search functionality, as its name implies. We have to use PowerShell scripts to configure search service application from SharePoint 2013 on wards as there is no user interface to configure the Search topology from SharePoint Central Admin - although we can create new search service application instance. Configuring SharePoint 2016 Search Service Application for Multi-Server Farm: While my earlier article addresses How to create search service application in SharePoint 2013 - Single Server farm , for Standalone SharePoint 2013 or SharePoint 2016 installations, In a production environment we may have to distribute and load balance search components to different servers in a multi-server farm. Here is the proposed Farm search topology in high level: I've the below servers in my SharePoint 2016 environment using Shared MinRoles: Web Front End + Distributed Cache Servers - 2 Application + Search Servers - 2 Since w
Create Search Service Application in SharePoint 2016 Multi-Server Farm using PowerShell Create Search Service Application in SharePoint 2016 Multi-Server Farm using PowerShell Reviewed by Salaudeen Rajack on 3:02 PM Rating: 5

SharePoint Online: Rename Files in Document Library using PowerShell

6:28 PM    , , , , ,
Requirement: Rename files in SharePoint document library using PowerShell PowerShell CSOM Script to rename a file in SharePoint Online: #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 for Site URL, Old File Name and New File Name $SiteURL= "https://crescent.sharepoint.com/sites/sales/" $OldFileURL="/sites/Sales/Documents/Legal.docx" $NewFileURL="/sites/Sales/Documents/LegalTemplate.docx" #Setup Credentials to connect $Cred = Get-Credential $Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password) Try { #Setup the context $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL) $Ctx.Credentials = $
SharePoint Online: Rename Files in Document Library using PowerShell SharePoint Online: Rename Files in Document Library using PowerShell Reviewed by Salaudeen Rajack on 6:28 PM Rating: 5

Create User Profile Service Application using PowerShell in SharePoint 2016

4:54 PM    , , , ,
We need User Profile Service Application to consume social features in SharePoint 2016 such as My Sites, User profiles, etc. This PowerShell script creates User Profile Service Application in SharePoint 2016. Prerequisite: Create my site host prior creating user profile service application. Create My site host using PowerShell in SharePoint PowerShell to create user profile service application in SharePoint 2016 Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Configuration Parameters $ServiceAppName = "User Profile Service Application" $ServiceAppProxyName = "User Profile Service Application Proxy" $AppPoolAccount = "Crescent\SP16_Pool" $AppPoolName = "Service Application App Pool" $DatabaseServer ="SP16-SQL" $UserProfileDB = "Farm_Profile_DB" $UserProfileSyncDB = "Farm_Profile_Sync_DB" $UserProfileSocialDB = "Farm_Profile_Social_DB" $MySiteHostLocation="http://mysi
Create User Profile Service Application using PowerShell in SharePoint 2016 Create User Profile Service Application using PowerShell in SharePoint 2016 Reviewed by Salaudeen Rajack on 4:54 PM Rating: 5

SharePoint Online: Site Users and Groups Report using PowerShell

4:54 PM    , , , , ,
Requirement: Generate a report with all site groups and members of each group of a SharePoint online site collection. Prerequisites: Make sure you have SharePoint Online Management Shell installed! Get all Site Groups and Members of Each group: #Import SharePoint Online Management Shell Import-Module Microsoft.Online.Sharepoint.PowerShell -DisableNameChecking #Variables for processing $AdminURL = "https://crescent-admin.sharepoint.com/" $AdminName = "spadmin@crescent.com" $SiteURL="https://crescent.sharepoint.com/sites/sales" #User Names Password to connect $Password = Read-host -assecurestring "Enter Password for $AdminName" $Credential = new-object -typename System.Management.Automation.PSCredential -argumentlist $AdminName, $Password #Connect to SharePoint Online Connect-SPOService -url $AdminURL -credential $Credential #Get all Site groups $SiteGroups = Get-SPOSiteGroup -Site $SiteURL #Get Members of each group foreach($Group
SharePoint Online: Site Users and Groups Report using PowerShell SharePoint Online: Site Users and Groups Report using PowerShell Reviewed by Salaudeen Rajack on 4:54 PM Rating: 5
Powered by Blogger.