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

PIM Alert checks fail if there are no active alerts #711

Open
biggles007 opened this issue Feb 28, 2025 · 0 comments
Open

PIM Alert checks fail if there are no active alerts #711

biggles007 opened this issue Feb 28, 2025 · 0 comments

Comments

@biggles007
Copy link

If there are no active PIM alerts available then the MT.1029, MT.1030, MT.1031 and MT.1032 checks can't complete. You get the following error.

RuntimeException: You cannot call a method on a null-valued expression.
at , /home/vsts/.local/share/powershell/Modules/Maester/1.0.32/public/Test-MtPimAlertsExists.ps1:49

foreach ($entry in $CurrentItem.GetEnumerator()) {

The test is assuming there will be an alert with an active status, which isn't always the case. The test is filtering for active alerts of the require ID which returns a null object which the test then tries to process, hence the error above.

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