to be a variable I can use, this is what I tried:
Code: Select all
@echo off
echo
color 3f
mode con:cols=140 lines=70
for /f "SID=" %%i in ('wmic useraccount where name=josh.carpenter get sid') do set output=%%i
Echo %SID%
Pause
It returns: josh.carpenter - Invalid verb
Overall my goal is:
Code: Select all
@echo off
echo
color 3f
mode con:cols=140 lines=70
Set /p Username="Enter Users name (Firstname.Lastname)
for /f "delims=" %%i in ('wmic useraccount where name=%username% get sid') do set output=%%i
Echo %delims%
Pause
but that returns the same error
Any help would be greatly appreciated.
Thanks.