EvotecIT / Testimo

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

Test "Group Policy Legacy ADM Files" includes non-legacy files when testing #84

Closed pmormr closed 4 years ago

pmormr commented 4 years ago

Test "Group Policy Legacy ADM Files"

The filter switch used for the test seems to include files with four character extensions (admx, adml) when searching. Using include instead of filter gets the intended result. It's like there's an implicit star on the end of it when you're using filter (e.g. *.adm*) judging from my tinkering just now.

Testimo.psm1 line 272

Get-ChildItem -Path "\\$Domain\SYSVOL\$Domain\policies" -ErrorAction Stop -Recurse -Include '*.adm' | Select-Object Name, FullName, CreationTime, LastWriteTime, Attributes

PrzemyslawKlys commented 4 years ago

Would you be able to provide PR for this? I mean I can fix issues myself but the more people do it, the better Testimo can get.

PrzemyslawKlys commented 4 years ago

The affected line is here:

https://github.com/EvotecIT/Testimo/blob/dc83535e517448967f94046c6648472a1d0277af/Private/SourcesDomain/GroupPolicyADM.ps1#L7-L8

pmormr commented 4 years ago

Sure... I think I have it all figured out.

https://github.com/EvotecIT/Testimo/pull/85

PrzemyslawKlys commented 4 years ago

Tnx, tested and you're indeed right. Not sure why I assumed it works with filter :/

PrzemyslawKlys commented 4 years ago

Released new version.