Diskpart not executing script
I am trying to execute some diskpart commands via a text file using the /s switch. The name of the file is DriveConfig.txt and the command I am using is "diskpart /s DriveConfig.txt". When I do this, the commands are not executed and all that happens is that a list of diskpart commands are displayed. I can execute the commands individually and they work just fine.
February 9th, 2010 9:38pm

Hi , You need to point to the text file where your script resides. so driveconfig.txt should have the script which diskpart accepts as input and executes it.a best way is to pump the output to a logfile eg: diskpart /s driveconfig.txt > output.txt where diskpart uses output.txt to write additiona information.
Free Windows Admin Tool Kit Click here and download it now
February 24th, 2010 9:48am

I was following the self study guide (70-680) and found an error (amongst MANY others!) that causes this very issue of the diskpart script not working. They tell you to start the script with the word 'diskpart' - this is WRONG and causes the script to fail to run and lists all the command options / switches. Remove this from the start of your script and it'll run fine.
July 16th, 2010 11:52am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics