Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminate Suspended Messages throws warnings #18

Open
agentq15 opened this issue Mar 26, 2020 · 0 comments
Open

Terminate Suspended Messages throws warnings #18

agentq15 opened this issue Mar 26, 2020 · 0 comments

Comments

@agentq15
Copy link

# AssociatedInstances include Routing Failure Reports which have no messages to save $AssociatedInstances = Get-WmiObject MSBTS_ServiceInstance -Namespace 'root\MicrosoftBizTalkServer' -Filter 'ServiceClass=1 or ServiceClass=4 or ServiceClass=64' $ServiceInstances,$AssociatedInstances | ForEach-Object { try { $InstanceId = $_.InstanceId [void]$_.Terminate() Write-Host ("Instance termination [{0}]" -f $InstanceId,$_.Exception.Message) } catch { Write-Host ("##vso[task.logissue type=warning;] Instance termination [{0}] FAILED: {1}" -f $InstanceId,$_.Exception.Message) } }

$ServiceInstances and $AssociatedInstances gets the same messages and both is looped over making it try to Terminate the same messages twice and throws a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant