How to install PnP PowerShell module for SharePoint Online
By default, you are not allowed to run scripts on a Windows computer, so before you can run any scripts you must allow that. To run any PowerShell command: Open PowerShell ISE as administrator Run the following command: Set-ExecutionPolicy -ExecutionPolicy Unrestricted Before you start using PowerShell with SharePoint, you should also install the SharePointPnPPowerShell module. This is a library of PowerShell commands that allows you to perform complex provisioning and artifact management actions toward SharePoint. Install-Module SharePointPnPPowerShellOnline When SharePointPnPPowerShell has been installed on the computer, it is imported to PowerShell each time it should be used and connected to the SharePoint site you want to work with. Import-Module SharePointPnPPowerShellOnline Connect-PnPOnline <SharePoint Site URL> A full script will look like the below: Set-ExecutionPolicy -ExecutionPolicy Unrestricted Install-Module SharePointPnPPowerS...