ben604 (30th May 2012)
Works fine here.. you're using bat file? not command line?
wdsutil /Set-Device /Device:moodle /ID:00:00:00:00:00
wdsutil /Set-Device /Device:test1 /ID:01:00:00:00:00
wdsutil /Set-Device /Device:test2 /ID:02:00:00:00:00
plexer's input file... and it works fine.
Seems my CSV file is dodgy... Stupid MyMaths. [I used the MyMaths login setup CSV to test.]
Le EDIT: Batch files don't like parsing files with UNC paths... FACT. [CTRL+C/CTRL+V the file to my admin account makes it work fine...]
So much shenanigans...
But... yeah. It's looking like your CSV is borked.
Last edited by X-13; 30th May 2012 at 11:06 AM.
I've attached a zip with the two files I'm using. I'm not executing it on the server with my admin creds on an elevated cmd...still no joy.
It's "in" not "on"
is wrong it should be:Code:for /f "tokens=1,2 delims=, " %%a on (c:\scripts\fog.csv) do echo wdsutil /Set-Device /Device:%%a /ID:%%b
You had on and not in before the input file.Code:for /f "tokens=1,2 delims=, " %%a in (c:\scripts\fog.csv) do echo wdsutil /Set-Device /Device:%%a /ID:%%b
damn beaten to it
But yes change the line as shown and it runs fine.
magnificent, it works a treat! Thanks for the help everyone!
Last edited by X-13; 30th May 2012 at 11:41 AM.
So close...it's putting the right information in the right place, but I'm getting an error:
An error occurred while trying to execute the command.
Error Code: 0xC1040133
Error Description: The specified computer could not be found.
Putting them in individually works ok...peculiar...
Right, worked it out. It should be /Add-Device not /Set-Device... all added to AD finally..!
Glad you got there in the end.
Amazing how a one line batch file can cause such head ache
You should see my 1 line batch file using For that searches students folder for a file matching criteria and then copies it to a destination within a subfolder named after that user.
There are currently 1 users browsing this thread. (0 members and 1 guests)