Prerequisites:
SharePoint Online Management Shell: https://www.microsoft.com/en-us/download/details.aspx?id=35588
PnP – PowerShell Cmdlets: https://github.com/officedev/pnp-powershell/releases
PowerShell Script:
Open SharePoint Online Management Shell and execute the following script.
## Connects to a SharePoint Site
Connect-SPOnline -Url https://c986.sharepoint.com -Credentials (Get-Credential)
## Returns a list Object
Get-SPOList
Get-SPOList -Identity 849a0636-60a5-460e-8329-631ae58700c7
Get-SPOList -Identity /Lists/Custom
##Disconnects the context
Disconnect-SPOnline