To start, I will always recommend to install cmdlets by using PowerShell since it will easier when there is an update because you don’t need to download the .msi.

Execution Policy

Get-ExecutionPolicy #Check the current ExecutionPolicy 
Set-ExecutionPolicy -ExecutionPolicy  Unrestricted

SharePoint Online Management Shell

Install:

Install-Module -Name Microsoft.Online.SharePoint.PowerShell

Check the current version:

Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version

Update:

Update-Module -Name Microsoft.Online.SharePoint.PowerShell

Uninstall:

Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell

PnP PowerShell

Install:

Install-Module SharePointPnPPowerShellOnline -Force
#Force will force to install the latest version

Check the version:

Get-Module SharePointPnPPowerShellOnline -ListAvailable | Select-Object Name,Version | Sort-Object Version -Descending

Update:

Update-Module SharePointPnPPowerShellOnline

Uninstall

Uninstall-Module -Name SharePointPnPPowerShellOnline

References

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-6

https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-online/connect-sharepoint-online?view=sharepoint-ps

By Sigar Dave

Technical Solutions Professional | Modern Workplace Architect Lead | Microsoft 365 | SharePoint | Power Platform | MS Teams | React

Leave a Reply

Your email address will not be published. Required fields are marked *

City marco island. Featured love stories | lauren schoepfer photography.