Skip to content

Instantly share code, notes, and snippets.

@darrenjrobinson
Created January 7, 2019 21:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darrenjrobinson/e54d2ea783f4d286df73bf7f9ea62ec4 to your computer and use it in GitHub Desktop.
Save darrenjrobinson/e54d2ea783f4d286df73bf7f9ea62ec4 to your computer and use it in GitHub Desktop.
Parse MS Graph JSON Batch Responses
foreach ($jobRMResult in $getBatchRequestRM.responses) {
$jobRMResult.id
write-host -ForegroundColor blue "jobID: $($jobRMResult.id)"
if ($jobRMResult.body.value.count -gt 1){
foreach ($entry in $jobRMResult.body.value){
write-host -ForegroundColor cyan " $($entry)"
}
} else {
write-host -ForegroundColor cyan " $($jobRMResult.body.value)"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment