none
MDT 2013 map network drive failed RRS feed

  • Question

  • HI Guys,

    I just get some problems about map a network drive with command line in MDT 2013.

    The following is my test environment (in vmware workstation) .

      DC : Windows server 2008 R2  (with ADDS DNS DHCP WDS )

      MDT : Windows server 2008 R2 + MDT 2013

      Sql   : Windows server 2008 R2 + Sql express 2008

      Client: which will be pushed OS

    I create a task senquence to push os to a virtual machine and it is successful when I using default disk partition step .

    But I want to test with the way of diskpart command with a txt . First of all I add command line to map the Y: drive where the diskpart.txt file located (command "net use Y: \\mdt\deploymentshare$ /user:test\administrator Password"). Then Add the other command line that "diskpart /s Y:\diskpart.txt" . It failed at last .

    I found that failed to map the Y: network drive . The most strange thing is that I can map successfully by manual in windows PE after pushing stoped .

    Does anyone know how to map a network drive in MDT with command line ? Thanks a lot .

    Friday, April 25, 2014 5:47 AM

Answers

  • Dear Frank ,

    Thanks , I try it by your way . Also failed .

    Now I recreate task sequence and find it map to \\sql\sqlshare suddenly . So I put the diskpart.txt in sqlshare.

    And now it works well . For now I still dont know why the network drive which map to \\mdt\deploymentshare was interrupted . And I can not re-map it by adding a command line in TS .

    That's too strange !


    • Edited by Robert Qian Tuesday, April 29, 2014 5:42 AM
    • Marked as answer by Robert Qian Tuesday, April 29, 2014 5:42 AM
    Tuesday, April 29, 2014 1:34 AM

All replies

  • are you actually using "Command" at the start of the net use?

    Try using cmd /c "net use Y: \\mdt\deploymentshare$ /user:test\administrator Password" instead

    Friday, April 25, 2014 12:27 PM
  • Hi there

    Not sure right now as I don't have my MDT test environment here, but I thought that the deployment share is being mounted as "Z:\" during the deployment.

    I guess your diskpart.txt file is located on the top-level of your deployment share? If so, it should work with "diskpart /s Z:\diskpart.txt" I think.


    Kind regards
    Makorus

    Friday, April 25, 2014 8:21 PM
  • HI RL,

    Thanks for your reply . I test your way and failed . But it is successful when I try your way by manual .

    So  I think commands is no problem . 

    Saturday, April 26, 2014 3:03 AM
  • HI Makorus,

    Thanks for your reply . And yes . You are right . I also find that the drive will be mapped .One is that Y : mapped to \\sql\sqlshare. The other is that Z: mapped to \\mdt\deploymentshare$ .

    But the key problem is the two network drives are all disconnected before I run "diskpart /s Y:\diskpart.txt" .

    I dont know why . I recreate the task sequence but still useless .

    Saturday, April 26, 2014 3:13 AM
  • It looks like you are trying to map to the deployment share, which would already be mapped during a TS- that could be where your issue is. You can use variables in the command line that would associate to the deployment share instead of mapping a drive, for example %DEPLOYROOT%, %SCRIPTROOT%, etc. So try this:

    1. Create a new folder under the scripts folder of the deployment share called CUSTOM (just to keep things organized), and put the diskpart.txt file in there.
    2. Create your Run Command Line and use this command: 

    Diskpart.exe /s "%SCRIPTROOT%\CUSTOM\diskpart.txt"


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”

    Saturday, April 26, 2014 4:33 AM
  • Dear Frank ,

    Thanks , I try it by your way . Also failed .

    Now I recreate task sequence and find it map to \\sql\sqlshare suddenly . So I put the diskpart.txt in sqlshare.

    And now it works well . For now I still dont know why the network drive which map to \\mdt\deploymentshare was interrupted . And I can not re-map it by adding a command line in TS .

    That's too strange !


    • Edited by Robert Qian Tuesday, April 29, 2014 5:42 AM
    • Marked as answer by Robert Qian Tuesday, April 29, 2014 5:42 AM
    Tuesday, April 29, 2014 1:34 AM