SharePoint Online: Export-Import Site Columns using PowerShell

September 29, 2017    , , ,
Requirement: Export-Import Site Columns in SharePoint Online. SharePoint Online: Export Site Columns using PowerShell This Powershell script exports all site columns of a specific group fro SharePoint Online site to a XML 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 to export site columns from a group Function Export-SPOSiteColumns([String]$SiteURL, [String]$SiteColumnGroup,[String]$XMLFile) { 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 All Site Columns of the Web $Ctx.Load($Ctx.We
SharePoint Online: Export-Import Site Columns using PowerShell SharePoint Online: Export-Import Site Columns using PowerShell Reviewed by Salaudeen Rajack on September 29, 2017 Rating: 5

SharePoint Online: Change List or Library URL using PowerShell

September 29, 2017    , , , ,
Requirement: Change URL of a List or Document Library in SharePoint Online using PowerShell. How to Change the List URL in SharePoint Online? Renaming a list doesn't change its URL! However, To change the URL of a List or Library in SharePoint Online we can use: File Explorer View, SharePoint Designer or PowerShell! To change the URL of a document library using Explore view: Open the Document Library in "File Explore View" Navigate One Level Up in the Explorer >> Select the Document Library to Rename Press "F2" (or Right Click and choose "Rename") >> Enter the new Name for your document library >> Hit "Enter" Using Explore View and SharePoint Designer to change the URL of a SharePoint list is explained in my another post for SharePoint On-Premises is applicable for SharePoint Online as well: How to Change URL of a List or Document Library in SharePoint? . So Here, lets change list URL in SharePoint Online with P
SharePoint Online: Change List or Library URL using PowerShell SharePoint Online: Change List or Library URL using PowerShell Reviewed by Salaudeen Rajack on September 29, 2017 Rating: 5

How to Make a SharePoint List or Library to Read Only Mode using PowerShell?

September 23, 2017    , , , , , , ,
Requirement: Set SharePoint list or document library to read only mode. How to make SharePoint List to Read Only? There is no direct way to set SharePoint list to read only! Read only mode can be set only on SharePoint site collections ( How to Make a Site Collection Read Only ) or on content databases ( Set SharePoint Content Database to Read Only Mode ). However, we can make a SharePoint list to read only by replacing all users permissions into "Read-only". These methods doesn't control Farm Administrators, Site Collection Administrators! How to make a SharePoint list or library read-only from SharePoint user interface:  Go to List Settings >> Permissions for this list Click on "Stop Inheriting Permissions" button from the ribbon and confirm the prompt Select All users >> Click on "Edit User Permissions" button. This leads to "Edit Permissions" page.  Select "Read" from choose permission section and click o
How to Make a SharePoint List or Library to Read Only Mode using PowerShell? How to Make a SharePoint List or Library to Read Only Mode using PowerShell? Reviewed by Salaudeen Rajack on September 23, 2017 Rating: 5

SharePoint Online: How to Create a List Template using PowerShell?

September 18, 2017    , , , , ,
Requirement: Create List Template in SharePoint Online How to Create List Template in SharePoint Online? List templates in SharePoint Online provides re-usability without having to recreate every single field and other settings in SharePoint list. E.g. you may created a custom list (say: Projects) in a SharePoint site collection with all relevant columns, and then you may need that list structure in other site collections, without recreating the list on every single site. To create list template in SharePoint Online, follow these steps: Go to your SharePoint Online List >> Navigate to List settings Click on "Save list as Template" under Permissions and Management group. Provide the file name and template name Choose the appropriate option for "include content" and Click OK to create list template in SharePoint Online. SharePoint Online: Save List as Template using PowerShell Lets use PowerShell to save list as template in SharePoint Onlin
SharePoint Online: How to Create a List Template using PowerShell? SharePoint Online: How to Create a List Template using PowerShell? Reviewed by Salaudeen Rajack on September 18, 2017 Rating: 5

SharePoint Online: Set Anonymous Link Expiration Settings

September 18, 2017    , , , , ,
Requirement: Configure Anonymous Link Expiration in SharePoint Online. How to Set Expiry for Anonymous Links in SharePoint Online? Anonymous links Expiration is a security best practice in SharePoint Online, This allows SharePoint Online administrators to sets the maximum expiration duration for items shared via anonymous shared links. You can set the SharePoint Online guest link expiration at the tenant level. To set anonymous links expiry days Login to the SharePoint admin center,  Click on Sharing >> Tick the checkbox next to "Anonymous access links expiry in this many days" and set the number of days the guest link can be active. E.g. 30 Click "OK" in the bottom of the page to save your changes. This enforces a mandatory expiration date setting for your anonymous links on the tenant level and determines the lifespan of anonymous shared links. If you don't set this expiry days: its default to 730 days (2 years! that's the maximum days y
SharePoint Online: Set Anonymous Link Expiration Settings SharePoint Online: Set Anonymous Link Expiration Settings Reviewed by Salaudeen Rajack on September 18, 2017 Rating: 5

Managed Path in SharePoint Online

September 16, 2017    
On migrating from SharePoint 2013 On-premises to SharePoint online, Client wanted to create managed paths /projects and /departments as in their existing on-prem environment. How to create managed path in SharePoint Online? Do you want to add managed path to SharePoint Online? Unfortunately SharePoint Online does not provide a mechanism for creating new managed paths, either via SharePoint admin center or through PowerShell cmdlets (As of today!). In SharePoint Online,  /sites and /teams are the only wildcard managed paths available to create site collections. In Short: SharePoint Online has no provision for the creation of managed paths!
Managed Path in SharePoint Online Managed Path in SharePoint Online Reviewed by Salaudeen Rajack on September 16, 2017 Rating: 5

SharePoint Online: How to Remove External Users using PowerShell?

September 13, 2017    , , ,
How to Remove External User from SharePoint Online? To remove an external user from SharePoint Online, we've to delete them from both site collection permissions and at Office 365 tenant levels. Step 1: Remove External User from SharePoint Online Tenant Use Remove-SPOExternalUser cmdlet in SharePoint Online to remove external user using PowerShell. To use the Remove-SPOExternalUser cmdlet, you'll need the unique ID of the external user. #Import SharePoint Online Management Shell Import-Module Microsoft.Online.Sharepoint.PowerShell -DisableNameChecking #Config Parameters $AdminSiteURL="https://crescenttech-admin.sharepoint.com" #Get Credentials to connect $Cred = Get-Credential #Connect to SharePoint Online Tenant Admin Connect-SPOService -URL $AdminSiteURL -Credential $Cred $ExternalUserID = "salaudeenar@hotmail.com" #Get the ID of the External User $ExternalUser = Get-SPOExternalUser -SiteUrl -filter $ExternalUserID #Remove External User Re
SharePoint Online: How to Remove External Users using PowerShell? SharePoint Online: How to Remove External Users using PowerShell? Reviewed by Salaudeen Rajack on September 13, 2017 Rating: 5

SharePoint Online: Find All Sites with Unique Permissions using PowerShell

September 12, 2017    , , ,
Requirement: Find All SharePoint Online Sites with Unique Permissions using PowerShell How to Check if a site (web) is using Unique permissions or inheriting permissions from the parent? To get if a site has broken permissions, follow these steps: Navigate to the Site and then go to Site Settings >> Site Permissions >>Advanced permissions settings. In Advanced permissions page gives you the information whether the site has unique permissions or not. If the site has unique permissions, you'll get the text " This site has unique permissions ", otherwise " This site inherits permissions from its parent." SharePoint Online: PowerShell to Get All Webs (subsites) with unique permissions This PowerShell gets you all subsites of a site collection, which are using unique permissions. #Load SharePoint CSOM Assemblies Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client
SharePoint Online: Find All Sites with Unique Permissions using PowerShell SharePoint Online: Find All Sites with Unique Permissions using PowerShell Reviewed by Salaudeen Rajack on September 12, 2017 Rating: 5

SharePoint Online: Create Multiple Site Collections in Bulk from a CSV File using PowerShell

September 11, 2017    , , , ,
Requirement: Create new site collections in SharePoint Online in Bulk from a CSV File using PowerShell How to Create site collections from a CSV file in SharePoint Online using PowerShell? Step 1: Create a CSV file in the below format. Populate the column values according to your requirements. For each site collection, set the below properties: Site collection Title Site collection URL Site Collection Owner Storage quota, in MB Resource quota (default is 300) Site collection template (E.g. Team site template ID STS#0) Step 2: Use this PowerShell script to read from CSV and create site collections and run with SharePoint Online Management Shell. #Function to Create Site Collection Function Create-SPOSite { param ( [string]$Title = $(throw "Please Provide the Site Title!"), [string]$URL = $(throw "Please Provide the Site URL!"), [string]$Owner = $(throw "Please Provide the Site Owner!"), [int]$Storag
SharePoint Online: Create Multiple Site Collections in Bulk from a CSV File using PowerShell SharePoint Online: Create Multiple Site Collections in Bulk from a CSV File using PowerShell Reviewed by Salaudeen Rajack on September 11, 2017 Rating: 5

How to Hide "Notebook" from SharePoint Online Quick Launch?

September 08, 2017    , ,
Requirement: Remove Notebook link from SharePoint Online quick launch navigation. How to disable Notebook in SharePoint Online? When you create a Site collection in SharePoint Online, the Notebook feature is enabled by default and the left navigation has a link to it. Here is how to hide the notebook link: Go to Site Settings >> Click on "Manage site features" link under Site Actions section. Scroll down and find the "Site Notebook" feature Click on "Deactivate" to disable the feature. This removes the "Notebook" link from both classic and modern SharePoint Online sites. Activating "Site Notebook" Feature again brings the Notebook link in the left navigation. You can also use "Navigation" under site settings to remove the "notebook" link from quick launch or use "Edit Links" feature!
How to Hide "Notebook" from SharePoint Online Quick Launch? How to Hide "Notebook" from SharePoint Online Quick Launch? Reviewed by Salaudeen Rajack on September 08, 2017 Rating: 5

SharePoint Online: Get All Permission Levels using PowerShell

September 06, 2017    , , ,
Requirement: Get permission levels in SharePoint Online site using PowerShell. SharePoint Online: PowerShell to Get Permission Levels Permission levels are sets of base permissions grouped together to provide a specific rights in the site. This script returns all permission level names including out-of-the-box permission levels such as "Full Control" and any custom permission levels created the given SharePoint Online site collection. #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 Get-SPOPermissionLevels() { param ( [Parameter(Mandatory=$true)] [string] $SiteURL ) Try { #Get Credentials to connect $Cred= Get-Credential $Credentials = New-Object
SharePoint Online: Get All Permission Levels using PowerShell SharePoint Online: Get All Permission Levels using PowerShell Reviewed by Salaudeen Rajack on September 06, 2017 Rating: 5

How to Check If SharePoint User is Member of a Active Directory Group using PowerShell?

September 05, 2017    , , ,
Requirement : Check If SharePoint User is Member of a Active Directory Group using PowerShell Solution : Although we can check if a particular user account is member of a AD security group using AD PowerShell cmdlets such as Get-ADGroupMember Here is the native method to find if a particular user account is a member of a given Active directory group. PowerShell to Check if SharePoint User is Member of a Active Directory Group: Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue #Variables $SiteURL="https://intranet.crescent.com/" $SearchUserAccount = "Crescent\salaudeen" #Custom Function to Check if User is member of a Active Directory Group Function Check-UserIsMemberOfADGroup($web,$SearchUserAccount,$GroupName) { Try { #Resolve the AD Group & User in SharePoint $ADGroup = $web.EnsureUser($GroupName) $User = $web.EnsureUser($SearchUserAccount) #Get All Users of the AD Group $Reached
How to Check If SharePoint User is Member of a Active Directory Group using PowerShell? How to Check If SharePoint User is Member of a Active Directory Group using PowerShell? Reviewed by Salaudeen Rajack on September 05, 2017 Rating: 5

SharePoint Online: Get Site Collection Created Date using PowerShell

September 02, 2017    , , , ,
Requirement: Get Site Collection creation date in SharePoint Online. SharePoint Online: PowerShell to Get Site Creation Date How to check SharePoint online site creation date? Well, There is no UI to get site creation date in SharePoint Online or in On-Premises. However, PowerShell can help to find SharePoint online site collection created date. #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 parameter values $SiteURL="https://crescent.sharepoint.com/sites/Ops" Try { #Get Credentials to connect $Cred= Get-Credential $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password) #Setup the context $Ctx = New-O
SharePoint Online: Get Site Collection Created Date using PowerShell SharePoint Online: Get Site Collection Created Date using PowerShell Reviewed by Salaudeen Rajack on September 02, 2017 Rating: 5
Powered by Blogger.