# CASE1: functionPS > function aaa ( [Parameter(ValueFromPipeline)]$aaa, $bbb, $ccc , $ddd ) { }PS > $PSDefaultParameterValues['aaa:ddd'] = { $PSBoundParameters >> aaa.log }PS > 1..5 | aaa -bbb BBB -ccc CCCPS > cat .\aaa.logKey Value--- -----bbb BBBccc CCCaaa 1... 2,3,4 ...Key Value--- -----bbb BBBccc CCCaaa 5Parameters are reflected in $PSBoundParameters.# CASE2: CmdletPS > $PSDefaultParameterValues['Get-ChildItem:Force'] = { $PSBoundParameters >> bbb.log }PS > $PSDefaultParameterValues['Get-ChildItem:Force'] = { "`n---`$args[0].BoundParameters---" >> bbb.log $args[0].BoundParameters >> bbb.log "`n+++`$PSBoundParameters+++" >> bbb.log $PSBoundParameters >> bbb.log }PS > ls -path .\aaa.log -File -VerbosePS > cat bbb.log---$args[0].BoundParameters---PathVerbose+++$PSBoundParameters+++---$args[0].BoundParameters---PathVerboseFile+++$PSBoundParameters+++---$args[0].BoundParameters---PathVerboseFile+++$PSBoundParameters+++Parameters are not reflected in $PSBoundParameters.
Have you seen this problem before in this product?
Please wait...