PesterInfrastructureTests icon indicating copy to clipboard operation
PesterInfrastructureTests copied to clipboard

module requires activedirectory module

Open BlackV opened this issue 7 years ago • 1 comments

This module requires the active directory modules to be accessible But it does not check its available before running

then failed with an error Describing Domain Controller Infrastructure Test
[-] Active Directory Forest is available 1.13s Expected a value, but got $null or empty. 10: $AllDomains | Should -Not -BeNullOrEmpty

you can import you session from the domain controller BUT

you are then looking for REPADMIN which is also goaing to fail

Context Replication Link Status [-] Error occurred in Context block 203ms CommandNotFoundException: The term 'repadmin' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Not sure what the best solution is, but a requires statement and updating the help (on get-help) will do half the job

BlackV avatar Jan 06 '19 19:01 BlackV

I'll think on how to solve this. The idea is that this should be installed on DC and tested DC stuff after updates and so on. However, I see your point so I'll try to work it out, or simply have a gentle termination if AD module is not found.

PrzemyslawKlys avatar Jan 06 '19 21:01 PrzemyslawKlys