@echo off
Powershell.exe -executionpolicy remotesigned -File C:\Users\aborgetti\Desktop\getdate.ps1
FOR /F "usebackq delims=" %%v IN ('powershell -noprofile -File C:\Users\aborgetti\Desktop\getdate.ps1') DO set "d=%%v"
echo %d%
This is the part that I am confused about...not really sure how to set the variable from powershell to a variable in the .bat file.
FOR /F "usebackq delims=" %%v IN ('powershell -noprofile -File C:\Users\aborgetti\Desktop\getdate.ps1') DO set "d=%%v"
Any help would be much appreciated.
BTW
The $d variable is being used in a set of initial commands for an FTP program called Bluezone FTP 3.2
getdate.ps1 looks like this:
$a = Get-Date
$b = $a.ToString('MMddyy')
write-host $b