for me, it is building an array of options for robocopy & then using that as the argument list for the util. it apparently works very much like that for other arguments. something like this ...
$RC_Params = @(
$Source
$Destination
$FileSpec
# put your current options below
"/Log:$FullLogFileName"
'/E'
'/TEE'
)
robocopy $RC_Params
it aint what i consider splatting, but it fits well enuf & is documented as such ... but i can't find the silly docs for it right now. [blush]
as i mentioned - it aint what i consider splatting. [grin] it's all positional or /ArgName:Value stuff. i had not tried it with an @ instead of a $ ... [blush]
4
u/[deleted] Apr 05 '19
wow, that's interesting. so the takeaway is that you can pass an array to a cmdlet with the parameters. TIL. thnx