Skip to content

Instantly share code, notes, and snippets.

@lazywinadmin
Created May 14, 2015 02:38
Show Gist options
  • Save lazywinadmin/a1d8dfa9a0159d0dbe43 to your computer and use it in GitHub Desktop.
Save lazywinadmin/a1d8dfa9a0159d0dbe43 to your computer and use it in GitHub Desktop.
Get Office365 Calendar Items using REST API
Invoke-RestMethod -Uri ("https://outlook.office365.com/api/v1.0/users/sharedmailbox@domain.com/calendarview?startDateTime=" + (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddThh:mm:ssZ") + "&endDateTime=" + (Get-Date).ToUniversalTime().AddDays(7).ToString("yyyy-MM-ddThh:mm:ssZ")) -Credential (Get-Credential) | foreach-object{$_.Value}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment