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