aldrichtr / infraspective

Infrastructure testing using pester
MIT License
18 stars 0 forks source link

infraspective elements should use hashtables vice string arrays for multi-part parameters #97

Open aldrichtr opened 2 years ago

aldrichtr commented 2 years ago

for example, in Invoke-InfraspecControl the -Tag parameter looks like this:

Control "windows-001' -Title "Ensure 'Enforce password history' is set to '24 or more passwords'" -Tags @(
'windows', 'cis benchmark') {
# tests here
}

we can have "richer" context if we change that to:

Control <# ... #> -Tags @{
'windows' = @('2012R2', '2016', '2019')
{
# tests here
}

That would also help with creating a Get-InfraspecControl function for use like:

Get-InfraspecControl -Tag windows -contains '2016'