Get a PowerShell result into a CMD variable
put this in your batch file:
@echo off
For /F %%t In ('PowerShell -command " (Get-Date).AddHours(-1).ToString('yyyy-MM-dd-HH') "') Do Set "FN=%%~t"
echo %FN%
put this in your batch file:
@echo off
For /F %%t In ('PowerShell -command " (Get-Date).AddHours(-1).ToString('yyyy-MM-dd-HH') "') Do Set "FN=%%~t"
echo %FN%