By default, you are not allowed to run scripts on a Windows computer, so before you can run any scripts you must allow that.
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
SharePoint Online Management Shell
Install
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
Uninstall
Uninstall-Module -Name Microsoft.Online.SharePoint.PowerShell
Update
Update-Module -Name Microsoft.Online.SharePoint.PowerShell
PnP PowerShell
Install
Install-Module SharePointPnPPowerShellOnline
Uninstall
Uninstall-Module -Name SharePointPnPPowerShellOnline
Update-Module SharePointPnPPowerShellOnline