EvotecIT / Testimo

Testimo is a PowerShell module for running health checks for Active Directory against a bunch of different tests
MIT License
526 stars 58 forks source link

WhereObject/ExpectedCount issue #89

Closed itpro-tips closed 4 years ago

itpro-tips commented 4 years ago

I go deeper in the tests and I think the WhereObject/ExpectedCount does not work well. For example the following test always sent Data is not available.

KeberosDES = @{ Enable = $true Name = 'Kerberos DES detection' Parameters = @{ WhereObject = { $_.UseDESKeyOnly -eq $true } ExpectedCount = 0 OperationType = 'eq' }

After fews digging, it seems the $object test in Test-StepOne.ps1 (line 28) return $null if object is empty $Object = $Object | Where-Object $WhereObject

PrzemyslawKlys commented 4 years ago

This isn't really a problem that it's null. It's a problem that I didn't add expectedoutput = $false and mustexists = false for tests.

PrzemyslawKlys commented 4 years ago

I also removed fail all tests - hopefully that won't bring issues for other tests.

itpro-tips commented 4 years ago

I don't understand the fix. From now, the KeberosDES /AllowReversiblePasswordEncryption/PrimaryGroup (maybe other) don't provide output at all, is it expected ?

PrzemyslawKlys commented 4 years ago

The fix is:

Next:

Here's my domain:

image

itpro-tips commented 4 years ago

My bad, I understand now. Thanks