windowspowershellcommandexternalinternals

PowerShell: External Command Output to Internal Command


I want to run these two commands in PowerShell in conjunction, and use the output of dir as the path in Get-ChildItem

cmd /r dir /b/s/a/t screenshot_37.png; powershell -command "& {Get-ChildItem "dir output" -recurse -force}"

Can I receive some insight into how this is possible?

(Context: I'm conducting searches of specific files, and want to know their attributes if found)


Solution