Get a PowerShell result into a CMD variable October 6, 2020 by sellout in Windows put this in your batch file: @echo off For /F %%t In ('PowerShell -command " (Get-Date).AddHours(-1