Net use /delete \\server\share not working on Windows 7?


  • Hi all -

    I have a need to delete a network connection by \\server\share name.

    Rationale: I'm doing this as a preliminary step in a script to avoid a error 1219 (multiple connections). I do not know in advance what the drive letter (if any) is on some pre-existing connection. Also, I don't want to blast ALL network connections on a machine -- that'd be rude, Bob.

    Here's what I see when I do net use:

    Status     Local     Remote                                   Network
    OK          Z:         \\multi.tiered.server\share         Microsoft Windows Network

    According to documentation and several user accounts in various forums, the following syntax should work:

         net use /delete \\server\share

    My server name is multi-tiered so here's what I'm trying:

         net use /delete \\multi.tiered.server\share

    No luck. I tried wrapping in quotes. Tried with / without whacks. Tried server name only. Tried moving around the /delete flag. Tried /DELETE. Won't work.

    Again, please note, I DO NOT KNOW what drive letter will be assigned if any at all. I need to delete all connections to this server only (not simply /delete *). I want to make this work WITHOUT a drive letter.

    Also, please note, I can imagine many work-arounds to this problem. What I'm asking for at this time is the proper syntax to make this work AS EXPECTED. I'm NOT LOOKING FOR WORKAROUNDS at this moment.

    Alternatively, if you KNOW that this is a bug and this this is blocked, I'd appreciate that info.

    Thanks so much for your help. It's greatly appreciated.

    - DF

    Saturday, April 30, 2011 2:10 AM


All replies