I'm trying to use a commandlet (I'm using NavContainerHelper) dynamically.
My parameters are in a System.Collections.Generic.List with the type string:
$navContainerHelperParameters = New-Object 'System.Collections.Generic.List[string]'
$navContainerHelperParameters.Add("-accept_eula")
I already tried using the @ before the call of the commandlet: New-NavContainer @navContainerHelperParameters, but this did not work as expected.
What would be the best way to call a commandlet dynamically?
Invoke-Commandand the-Argumentlistoption.-containerName $containerNameand$containerNameis out of scopeNew-NavContainer -accept_eula.