Last active
August 29, 2015 13:56
-
-
Save vgrem/9259675 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Example 1. Gets a value that specifies usage information about the site, including bandwidth, storage, and the number of visits to the site collection | |
$result = .\Invoke-RestSPO.ps1 -Url "https://contoso.sharepoint.com/_api/site/usage" -UserName "username@tenant.onmicrosoft.com" -Password "password" | |
write-host 'Total amount of disk space, currently being used by the site collection (Mb):' ([math]::round($result.Usage.Storage /1Mb)) | |
#Example 2. Get List Items | |
.\Invoke-RestSPO.ps1 -Url "https://contoso.sharepoint.com/_api/web/lists/getbytitle('Contacts')/title" -UserName "username@tenatnt.onmicrosoft.com" -Password "password" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment