I would like to include both switch parameter into the underlying invoke-pester $finalhash so when i enter those switches it will add in the parameters appropriately with having to use a long condition? Is it possible to do it with Dynamic parameters? I cant picture what the end result will be like.
Sorry about that,my tablet key board is playing up but that should have read “pass parameters into invoke-pester”
Anyway I have constructed the $hash to feed into $finalhash.
It works great.
What I would like is to have the ability to add in parameters like -quiet and passthru to feed into the underlying invoke-pester command
I know I can do this easily if it was just one parameter, but when it comes to two or more it will turn into a bit of a hell…when i do if statements ie for example
I know thats one way of doing it and its great if its just two but as i add more parameters i can see that it will cause more complications…I was wondering if there was another way that I can add -quiet or -passthru.
Yeah, so you’d just pass “Quiet”=$True for a switch parameter. The $hash from your original example would be a hash table, of course, with whatever parameters you needed. Does that help?