If you have a function:
$function:foo | % Invoke @(
'bar'
'directory'
$true
)
If you have a cmdlet:
[PSCustomObject] @{
Path = 'bar'
Type = 'directory'
Force = $true
} | New-Item
If you have an application:
{foo.exe @Args} | % Invoke @(
'bar'
'directory'
$true
)
Or
icm {foo.exe @Args} -Args @(
'bar'
'directory'
$true
)