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)
"& { ... }"in order to invoke code passed to PowerShell's CLI via the-Command(-c) parameter - just use"..."directly. Older versions of the CLI documentation erroneously suggested that& { ... }is required, but this has since been corrected.