File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ function Get-MsGraphResults {
133
133
else {
134
134
# # Ignore errors with specific codes else display non-terminating error
135
135
if ($ResponseDetail [' ContentParsed' ].error.code -eq ' Request_ResourceNotFound' ) {
136
- # Write-Error -Exception $_.Exception -Message $ResponseDetail['ContentParsed'].error.message -ErrorId $ResponseDetail['ContentParsed'].error.code -Category $_.CategoryInfo.Category -CategoryActivity $_.CategoryInfo.Activity -CategoryReason $_.CategoryInfo.Reason -CategoryTargetName $_.CategoryInfo.TargetName -CategoryTargetType $_.CategoryInfo.TargetType -TargetObject $_.TargetObject -ErrorVariable cmdError -ErrorAction SilentlyContinue
136
+ Write-Error - Exception $_.Exception - Message $ResponseDetail [' ContentParsed' ].error.message - ErrorId $ResponseDetail [' ContentParsed' ].error.code - Category $_.CategoryInfo.Category - CategoryActivity $_.CategoryInfo.Activity - CategoryReason $_.CategoryInfo.Reason - CategoryTargetName $_.CategoryInfo.TargetName - CategoryTargetType $_.CategoryInfo.TargetType - TargetObject $_.TargetObject - ErrorVariable cmdError - ErrorAction SilentlyContinue
137
137
# Write-Warning $ResponseDetail['ContentParsed'].error.message
138
138
}
139
139
else {
@@ -158,7 +158,7 @@ function Get-MsGraphResults {
158
158
else {
159
159
# # Ignore errors with specific codes else display non-terminating error
160
160
if ($BatchResponse.body.error.code -eq ' Request_ResourceNotFound' ) {
161
- # Write-Error -Message $BatchResponse.body.error.message -ErrorId $BatchResponse.body.error.code -ErrorVariable cmdError -ErrorAction SilentlyContinue
161
+ Write-Error - Message $BatchResponse.body.error.message - ErrorId $BatchResponse.body.error.code - ErrorVariable cmdError - ErrorAction SilentlyContinue
162
162
# Write-Warning $BatchResponse.body.error.message
163
163
}
164
164
else {
@@ -444,7 +444,6 @@ function Get-MsGraphResults {
444
444
$Activity = (' {0} {1}' -f $Request.method.ToUpper (), $uriEndpoint.AbsolutePath )
445
445
$ProgressState = Start-Progress - Activity $Activity - Total $Total
446
446
$ProgressState.CurrentIteration = $Result.value.Count
447
- $MaxRetries = 5
448
447
try {
449
448
while (Get-ObjectPropertyValue $Result ' @odata.nextLink' ) {
450
449
Update-Progress $ProgressState - IncrementBy $Result.value.Count
You can’t perform that action at this time.
0 commit comments