mrfite
asked on
How do I add text file input to this bach file
I have the following batch file to pull a computer's UUID and add it to the WIndow's Deployment Service for Prestaging.
I have gone into my existing AD and queried the Computer's from it and output it to a file called "ad.txt". I want to use "ad.txt" as the input and run the below script:
for /f %%I IN (
'psexec \\^%1 cmd /c "echo csproduct get UUID|wmic.exe" ^| ^
findstr /r ........-....-....-....-.. .......... '
) do wdsutil /set-device /device:%1 /id:%%~I
I have gone into my existing AD and queried the Computer's from it and output it to a file called "ad.txt". I want to use "ad.txt" as the input and run the below script:
for /f %%I IN (
'psexec \\^%1 cmd /c "echo csproduct get UUID|wmic.exe" ^| ^
findstr /r ........-....-....-....-..
) do wdsutil /set-device /device:%1 /id:%%~I
ASKER
Qlemo,
When I run the batch I get
'wdsadd' is not recognized as an internal or external command, operable program, or batch file.
When I run the batch I get
'wdsadd' is not recognized as an internal or external command, operable program, or batch file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the quick response and solution that worked.
Open in new window