I have a code looking somthing like this:
Param ( [Parameter(Mandatory=$true)] [String]$ToExecute, [String]$Parent, [String]$ParentInfo, [Parameter(ValueFromRemainingArguments=$true)] [System.Collections.Arraylist]$Arguments )
I want to be able to use "& script.ps1 -ToExecute ‘c:\test.ps1’ -P ‘test’
and it has to put the “-P ‘test’” as to items in the array
It works with "& script.ps1 -ToExecute ‘c:\test.ps1’ -A ‘test’ but not with -P because i have optional parameters that start with a P.
Can I disable that partial parameters stuff?