Closed itpro-tips closed 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.
I also removed fail all tests - hopefully that won't bring issues for other tests.
I don't understand the fix. From now, the KeberosDES /AllowReversiblePasswordEncryption/PrimaryGroup (maybe other) don't provide output at all, is it expected ?
The fix is:
Next:
Here's my domain:
My bad, I understand now. Thanks
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