How to Install/Update/UnInstall SharePoint Online Management Shell

By Sigar Dave No comments

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

Please follow and like us:

Leave a Reply