Solved

Delete a NET USE to a specified server

Posted on 2013-01-24
4
878 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
Comment Utility
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.
Comment Utility
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
Comment Utility
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.
Comment Utility
It looks like it should work. But I go pulled of to other tasks.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now