The examples below require a PowerShell module available here on TechNet Gallery.


Microsoft provided us with great API endpoints that allows interacting with sites remotely. You can refer to the articles below to Get to know the SharePoint 2013 REST service better, or find out about Completing basic operations using SharePoint 2013 REST endpoints:


You can also find full endpoints reference here:

REST API reference

The cmdlet below leverages these possibilities to allow you to do what SharePoint Online Management Shell can't: retrieve SharePoint objects below site collection level, like lists, items, workflows, content types - you name it :)  

Before You Begin

  1. Download the module from Technet Gallery. Click here to start the download.
  2. Import into your PowerShell using Import-Module cmdlet:
    import-module E:\technet\'Access Requests'\GetSPOObjects.psm1 -Verbose
  3. Get whatever you want :)

Sample Uses

Get all lists on a site

Get-SPOObject -Username -password $pass -Url "" -Object "web/lists"

Get a single list called "lista"

Get-SPOObject -Username -password $pass -Url "" -Object "web/lists/getbytitle('lista')"

Get all items from a list

Get-SPOObject -Username -password $pass -url
-object "web/lists/getbytitle('lista')/items"

Get all views from a list on a subsite

Get-SPOObject -Username -password $pass -Url "" -Object "web/lists/getbytitle('Access Requests')/views"

Get all available content types' names from a subsite

Get-SPOObject -Username -password $pass -Url "" -Object "web/availablecontenttypes"| select name

Get all site users

Get-SPOObject -Username -password $pass -Url -Object "web/siteusers"

For more interesting and advanced scenarios check See Also.

If it's your first encounter with REST API and you are not sure what is possible, use this module. It is a more limited version, but you can TAB through all the suggestions for the -Object parameter.


See Also