Solved

Delete a NET USE to a specified server

Posted on 2013-01-24
4
888 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.
  • 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying 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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

730 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