PnP PowerShell that allows you to perform complex provisioning and artifact management actions towards SharePoint. The commands use CSOM and can work against both SharePoint Online as SharePoint On-Premises.
-----------------------------------------------
If you use PnP PowerShell to manage your SharePoint On-premises continue using SharePointPnPPowerShellOnline:
Refer: [ Ссылка ]
Update-Module SharePointPnPPowerShellOnline*
-----------------------------------------------
If you use PnP PowerShell to manage SharePoint Online, follow the below steps:
Refer: [ Ссылка ]
# To uninstall older PNP Powershell version
Uninstall-Module -Name SharePointPnPPowerShellOnline -AllVersions –Force
# Install PnP PowerShell. This will work on Windows / Linux / MacOS
Install-Module -Name "PnP.PowerShell"
# You will have to consent / register the PnP Management Shell Multi-Tenant Azure AD Application in your own tenant:
Register-PnPManagementShellAccess
# This will launch a device login flow that will ask you to consent to the application. Notice that is only required -once- per tenant. You will need to have appropriate access rights to be able to consent applications in your Azure AD.
# Connect to PNP PowerShell
Connect-PnPOnline -Url [ Ссылка ] -Credentials (Get-Credential)
# For MFA or any other authentication provider configured for it, instead use:
Connect-PnPOnline -Url [ Ссылка ] -Interactive
Ещё видео!