Hi,
why is that inside powershell I can run command:
ls ~\Downloads | where {($_.LastWriteTime).AddDays(1) -lt (get-date)} | remove-item -force -recurse
But when I try to run this in CMD shell:
powershell -command {ls ~\Downloads | where {($_.LastWriteTime).AddDays(1) -lt (get-date)} | remove-item -force -recurse}
Command fails.