In a batchfile, how do I store the output of a powershell command in a variable This isn't working
set yest=powershell get-date((get-date).addDays(-1)) -uformat "%Y%m%d"
powershell get-date((get-date).addDays(-1)) -uformat "%Y%m%d"
gives 20130623
set yest=powershell get-date((get-date).addDays(-1)) -uformat "%Y%m%d"
echo %yest%
gives powershell get-date((get-date).addDays(-1)) -uformat "md"
a was unexpected at this time