?
Solved

Delete a NET USE to a specified server

Posted on 2013-01-24
4
Medium Priority
?
912 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 1000 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 1000 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

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

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

WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

765 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