Solved

Delete a NET USE to a specified server

Posted on 2013-01-24
4
893 Views
Last Modified: 2013-02-26
When I do a NET USE it returns something like this:

Status       Local     Remote                    Network
-------------------------------------------------------------------------------
OK                     \\10.101.194.32\apps      Microsoft Windows Network
OK                     \\10.101.194.32\customers Microsoft Windows Network
OK                     \\10.101.201.28\C$        Microsoft Windows Network
                       \\TSCLIENT\C              Microsoft Terminal Services
                       \\TSCLIENT\D              Microsoft Terminal Services
                       \\TSCLIENT\F              Microsoft Terminal Services
                       \\TSCLIENT\G              Microsoft Terminal Services

Open in new window


I'm working in an Access database and want grab files from or push files to a file server (the \\10.101.194.32 -- call it PrimeSrvr) in a different domain on the local network. But I will never be sure if the user has already authenticated or connected to the PrimeSrvr on any given day or an particular share.

So I what I want to do is delete all the connections to PrimeSrvr, but leave any others in place, such as the \\TSClient in or the connection the other computer's admins share (the \\10.101.201.28\C$).

I know there is the NET USE * /DELETE, but that would wipe them all out. I just want to wipe out the PrimeSrvr ones only and the re-authenticate so I know I can grab the files I need.

Anyone have suggestions?
0
Comment
Question by:Jim P.
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 14

Assisted Solution

by:Schnell Solutions
Schnell Solutions earned 250 total points
ID: 38816823
Like you know, net use * /delete eliminates all the connections

In your case, you can eliminate one by one the desired connections, for example:

net use \\10.101.194.32\apps /delete

and so on
0
 
LVL 38

Author Comment

by:Jim P.
ID: 38816842
I'm trying to do this programmatically  from an MS Access DB. I won't know what shares are connected.
0
 
LVL 20

Accepted Solution

by:
agonza07 earned 250 total points
ID: 38817240
You'll likely have to script it.

Check out this link to give you an idea of how to check for mapped drives to one server. Its not what you are looking for, but it'll lead you in a good direction.

http://stackoverflow.com/questions/12351518/script-to-change-users-manually-mapped-drives-to-a-new-server-with-new-server-na
0
 
LVL 38

Author Closing Comment

by:Jim P.
ID: 38931177
It looks like it should work. But I go pulled of to other tasks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question