I\'m trying to execute a powershell from a batch file with the commande: Powershell .\\nameoffile.ps1
The PowerShell returns some values 1, 4, 0 and -1 . How can I get t
If you need to use this value in your bat environment use FOR /F :
bat
FOR /F
@echo off for /f "delims=" %%a in ('powershell .\test.ps1') do Set "$Value=%%a" Echo Value received from Powershell : %$Value%