Fix "The requested operation is part of an experimental feature that is not supported in the current environment." Error

June 30, 2019    , ,
Problem: When trying to run a PowerShell cmdlet, got this error message: "The requested operation is part of an experimental feature that is not supported in the current environment." If a new feature is not yet rolled out for your tenant, SharePoint shows this error. Solution: Set the release preference in Office 365. Go to your Office 365 Admin Center >> Click on "Settings" from left navigation >> Click on "Organisation Profile" In Organization profile page, Click on "Edit" button net to "Release Preferences" Change the release preference to "Targeted release for everyone" and confirm the prompt on next page. You may need to wait for sometime for the changes to take effect!
Fix "The requested operation is part of an experimental feature that is not supported in the current environment." Error Fix "The requested operation is part of an experimental feature that is not supported in the current environment." Error Reviewed by Salaudeen Rajack on June 30, 2019 Rating: 5

Fix "Cannot contact web site ‘https://tenant-admin.sharepoint.com/’ or the web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'" Error

June 30, 2019    , ,
Problem: When trying to connect to SharePoint Online through PowerShell script, got this error message "Cannot contact web site ‘https://crescent-admin.sharepoint.com/’ or the web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'" Tried running a CSOM script and got an error: "Exception calling "ExecuteQuery" with "0" argument(s): "Cannot contact web site 'https://crescent.sharepoint.com/' or the web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'. " #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.c
Fix "Cannot contact web site ‘https://tenant-admin.sharepoint.com/’ or the web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'" Error Fix "Cannot contact web site ‘https://tenant-admin.sharepoint.com/’ or the web site does not support SharePoint Online credentials. The response status code is 'Unauthorized'" Error Reviewed by Salaudeen Rajack on June 30, 2019 Rating: 5

Connect-PnPOnline : The term 'Connect-PnPOnline' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

June 29, 2019    , , ,
Problem: When trying to run a PowerShell script for SharePoint Online, got this error message: "Connect-PnPOnline : The term 'Connect-PnPOnline' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again." Case 1: PnP PowerShell Module is not Installed Usually, this error occurs when you don't have the PnP PowerShell module for SharePoint Online is installed on the local machine.  So, to get rid of this error, you must install "SharePointPnPPowerShellOnline" module as: Install-Module SharePointPnPPowerShellOnline More information on installing PnP PowerShell module for SharePoint online is here: How to Install PnP PowerShell Module for SharePoint Online? Case 2: Multiple Versions of PnP PowerShell Module is installed and there is a Conflict! In some cases, this error could be because of multiple versions of the
Connect-PnPOnline : The term 'Connect-PnPOnline' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Connect-PnPOnline : The term 'Connect-PnPOnline' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Reviewed by Salaudeen Rajack on June 29, 2019 Rating: 5

SharePoint Online: Change Regional Settings using PowerShell

June 17, 2019    , ,
Requirement: Change regional settings in SharePoint Online using PowerShell How to Change Regional Settings in SharePoint Online? Changing regional settings of a SharePoint Online site is straightforward. Navigate to your SharePoint Online site >> Click on Settings >> Site Settings Under the "Site settings" page, click on "Regional Settings" link under "Site Administration" (/_layouts/15/regionalsetng.aspx) In the "Regional Settings" page, you can set all regional settings for the site, such as Time Zone, Locale, Sort order, calendar, work week, time format. When you visit the regional settings at the root site, you have an option to apply the settings to all sub-sites in the site collection. SharePoint Online: Set Regional Settings 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-
SharePoint Online: Change Regional Settings using PowerShell SharePoint Online: Change Regional Settings using PowerShell Reviewed by Salaudeen Rajack on June 17, 2019 Rating: 5

Migrate SharePoint 2010 Document Libraries to SharePoint Online using PowerShell

June 16, 2019    , , , , , ,
Requirement: Migrate Document Libraries from SharePoint 2010 to SharePoint Online. How to Migrate SharePoint 2010 Document Libraries to SharePoint Online? The idea is: Export all document libraries from SharePoint On-premises to local drive, export metadata of each document to a CSV file and then Import them to SharePoint Online. Before we begin, Please note, this is not a full fledged migration script which can migrate metadata, security, version history, etc. This script only copies document libraries with its file-folders and metadata "Created by", "Created On", "Modified By", "Modified On" to SharePoint Online. You need 3rd party migration tools if you want migrate all missing pieces! Step 1: Export SharePoint On-Premises Document Library As a first step, Login to any of your SharePoint On-premises web front end server and run the below PowerShell script to export either a single document library or all document libraries from ShareP
Migrate SharePoint 2010 Document Libraries to SharePoint Online using PowerShell Migrate SharePoint 2010 Document Libraries to SharePoint Online using PowerShell Reviewed by Salaudeen Rajack on June 16, 2019 Rating: 5

SharePoint Online: How to Convert Classic Sites to Modern Sites?

June 11, 2019    
Requirement: Convert SharePoint Online site from classic to modern How to change classic site to modern in SharePoint Online? SharePoint Modern experience has many advantages compared with classic, like better user experience, faster page loading, responsive design, etc. There are several methods available to switch from classic to modern experience in SharePoint Online: Option 1: Connect SharePoint Online Classic Site to Office 365 Group We can convert SharePoint Online from classic to modern by connecting it to Office 365 group. Here is how: Navigate to your SharePoint Online classic site >> Click on Settings gear >> Choose "Connect to a new Office 365 Group" from the settings menu. This invokes a wizard to connect team site to Office 365 group. Click on "Let's get Started" button. You'll be presented with New O365 Group properties page. You can update the group name and email alias, and select the group's privacy and then c
SharePoint Online: How to Convert Classic Sites to Modern Sites? SharePoint Online: How to Convert Classic Sites to Modern Sites? Reviewed by Salaudeen Rajack on June 11, 2019 Rating: 5

How to Create a Log File in PowerShell Script?

June 11, 2019    
Requirement: Generate a log file and add messages to it to track the execution of a PowerShell script How to Create a Log File in PowerShell? We may need to log messages to help us troubleshooting where and what went wrong during the execution of the script. Sometimes, for tracking purposes. The simplest way to generate log files by adding content to a text file is: Function Log-Message([String]$Message) { Add-Content -Path "C:\Temp\Log.txt" $Message } Log-Message "Beginning exeuction of the script:" Log-Message "Exeucting of the script..." Log-Message "Completed exeuction of the script!" Case 1: Create Log File from Time Stamp in the Current Directory Let's create a log file based on the current timestamp and log messages prepending time stamp to it. Function Log-Message() { param ( [Parameter(Mandatory=$true)] [string] $Message ) Try { #Get the current date $LogDate = (Get-Date).tostring("
How to Create a Log File in PowerShell Script? How to Create a Log File in PowerShell Script? Reviewed by Salaudeen Rajack on June 11, 2019 Rating: 5

SharePoint Online: "The remote server returned an error (401) Unauthorized" Error in PowerShell

June 05, 2019    , , ,
Problem: "The remote server returned an error (401) Unauthorized." Error in SharePoint Online Troubleshooting Checklist: Here is the various root causes and solutions for this issue: 1. Is your URL Correct? #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 = "http://crescent.sharepoint.com/sites/marketing" #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 $Web=$Ctx.Web $Ctx.Load($Web) $Ctx.ExecuteQuery() You'll get
SharePoint Online: "The remote server returned an error (401) Unauthorized" Error in PowerShell SharePoint Online: "The remote server returned an error (401) Unauthorized" Error in PowerShell Reviewed by Salaudeen Rajack on June 05, 2019 Rating: 5

SharePoint Online: Move Subsite to Another Site using PowerShell

June 05, 2019    , , ,
Requirement: Move Subsite to a new site in SharePoint Online. How to Move a subsite in SharePoint Online? Let's move a subsite to the root site in SharePoint Online using content and structure page: Go to Site settings page >> Click on "Content and Structure" link (https://tenant.sharepoint.com/sites/your-site-collection/_layouts/15/sitemanager.aspx) Select the subsite from the Treeview >> Click on "Move" from the subsite's context menu. Select the target site and click on "OK" to move the subsite to the new site. This moves the subsite to another site in the same site collection. We can use this method to move SharePoint online subsite to another subsite too. PowerShell to move subsite to another site in SharePoint Online : Let's move subsite to root site with PowerShell. #Set Parameter values $SiteURL = "https://crescent.sharepoint.com/sites/marketing/us/2017" $NewSiteURL = "/sites/marketing/201
SharePoint Online: Move Subsite to Another Site using PowerShell SharePoint Online: Move Subsite to Another Site using PowerShell Reviewed by Salaudeen Rajack on June 05, 2019 Rating: 5

SharePoint Online: Apply Theme using PnP Provisioning Template PowerShell

June 04, 2019    , , , , ,
Requirement: Set Theme in SharePoint Online Site using PnP PowerShell Provisioning Template. How to Change the Site Theme in SharePoint Online using PnP Provisioning Template? Go to PnP Provisioning Schema repository in GitHub and build your provisioning template. https://github.com/SharePoint/PnP-Provisioning-Schema , Here is mine: Provisioning Template Schema XML for Theme: <?xml version="1.0"?> <pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2019/03/ProvisioningSchema"> <pnp:Preferences Generator="OfficeDevPnP.Core, Version=3.9.1905.0, Culture=neutral, PublicKeyToken=null" /> <pnp:Templates ID="CONTAINER-TEMPLATE-a170b11a-d4d3-486f-b191-946ff2acaec3"> <pnp:ProvisioningTemplate ID="TEMPLATE-a170b11a-d4d3-486f-b191-946ff2acaec3" Version="1" BaseSiteTemplate="SITEPAGEPUBLISHING#0" Scope="RootSite"> <pnp:Theme Name="Orange" IsInver
SharePoint Online: Apply Theme using PnP Provisioning Template PowerShell SharePoint Online: Apply Theme using PnP Provisioning Template PowerShell Reviewed by Salaudeen Rajack on June 04, 2019 Rating: 5

Set Footer in SharePoint Online Communication Site using PowerShell

June 02, 2019    , , ,
Requirement: Set Footer in SharePoint Online Communication Site using PnP PowerShell How to Provision Footer links in SharePoint Online using PnP Provisioning Template? Go to PnP Provisioning Schema repository in GitHub and build your provisioning template. https://github.com/SharePoint/PnP-Provisioning-Schema , Here is mine: Provisioning Template XML for Footer Links: <?xml version ="1.0"?> <pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2019/03/ProvisioningSchema"> <pnp:Preferences/> <pnp:Templates ID="CONTAINER-TEMPLATE-c49f81cd-19d0-458d-a99d-1a616c252add"> <pnp:ProvisioningTemplate ID="TEMPLATE-c49f81cd-19d0-458d-a99d-1a616c252add" Version ="1"> <pnp:Footer Enabled="true" Name="" Logo="SiteAssets/logo.png" RemoveExistingNodes="true"> <pnp:FooterLinks> <pnp:FooterLink DisplayName="Contact Us" Url="
Set Footer in SharePoint Online Communication Site using PowerShell Set Footer in SharePoint Online Communication Site using PowerShell Reviewed by Salaudeen Rajack on June 02, 2019 Rating: 5
Powered by Blogger.