microsoft / CSS-Exchange

Exchange Server support tools and scripts
MIT License
1.21k stars 332 forks source link

Include "-ErrorAction Stop" to Get-LocalGroupMember #2102

Closed dpaulson45 closed 2 weeks ago

dpaulson45 commented 3 weeks ago

This allows problem environments to still execute the script

Issue: After today's release, a few customers reported a problem with the Health Checker Script. It has to do with Get-LocalGroupMember returning an error that is causing some problems.

Reason: Adding a quick fix for this to prevent other customers seeing this issue.

Fix: Add in -ErrorAction Stop to the cmdlet and it executes as you would expect it to. However, might want to come back in and add in a workaround for those issues so the customers that are unable to run Get-LocalGroupMember can still have the same check performed.

Validation: Lab and customer tested.