>>411
こんな感じでよくない?
Get-ChildItem -Path $source -Recurse:(Test-Path $source -PathType Container)

hoge.exe の仕様にもよるけれど、-File とかも指定しないと変かも。