Announcement

Collapse
No announcement yet.

Can't use "NET USE".

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't use "NET USE".

    I'm trying to delete all drive mappings in a login script before reconnecting them. According to "Net Use /Help", I can use the following:
    Code:
    net use * /delete /persistent:no
    But when this runs, I get the error:
    The syntax of this command is: ......and the rest of the NET USE Help commands
    I tried the following:
    net use * /delete
    net use /persistent:no
    But after the "/delete" line executes, I get the following:
    C:\Documents and Settings\Administrator.JLRXMELB>net use * /delete
    You have these remote connections:

    G: \\jlrx01\jldata
    S: \\sqlserver\solomon
    T: \\gopher\netadmin
    Continuing will cancel the connections.

    Do you want to continue this operation? (Y/N) [N]:
    How do I get the script to not ask for a Y/N response and just default to Yes?

    Windows Server 2003.
    Last edited by JDMils; 29th June 2006, 01:57.
    |
    +-- JDMils
    |
    +-- Regional Systems Engineer, DotNet programmer & Jack of all trades
    |

  • #2
    Re: Can't use "NET USE".

    Hi JDMils

    The "/delete" "/persistent" are mutually exclusive.
    To forgo the prompt to confirm the deletion use "/delete /y"
    Last edited by JeremyW; 29th June 2006, 02:25.
    Regards,
    Jeremy

    Network Consultant/Engineer
    Baltimore - Washington area and beyond
    www.gma-cpa.com

    Comment


    • #3
      Re: Can't use "NET USE".

      Top Answer JeremyW!
      |
      +-- JDMils
      |
      +-- Regional Systems Engineer, DotNet programmer & Jack of all trades
      |

      Comment

      Working...
      X