NET USE command using Telnet

Using Telnet I connect to a machine on network. Connection  is OK.
I am using the command to map a network folder, as follows :-

NET USE S: \\server\abc /user:server\test1 /persistant:yes

The command executes sucessfully. Drive S: gets created. We can use that.

The problem are :-
  1. As I exits Telnet, S: disappears from that system.
  2. During the connection there was a red cross on S: before exiting Telnet. I don't need that.

I Don't want to use ADS.
I have to map the drive from CLI only.
Is there any script using which I can map any network folder to client machine, Silently & persistantly.

Regards
LVL 7
sunilcomputerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jeff_trentCommented:
When using the /user switch, are you actually using the server name when you specify "/user:SERVER\test1" or are you using the domain name instead?

The proper syntax for this command requires using the domain name and not the server name.  Alternatively, if you're mapping a drive to a network share that exists on a server where your "test1" account already has privileges, you don't have to specify domain name or server name.  Try "/user:test1" instead.
sunilcomputerAuthor Commented:
Drive is Mapped Correctly. That is not the problem.
The Problem is It is Disappearing as I exists Telnet.
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

jeff_trentCommented:
I just caught on that you're using a telnet session rather than the command line.  This IS your issue.  Commands in a Telnet session are not treated like commands issued from the local command line.  Active Telnet sessions only keep commands in cache for the duration of the session (as far as I know).

Is there any compelling reason that you're doing this through a Telnet session?
sunilcomputerAuthor Commented:
Because I can't visit all the machines (over 50) in the building one by one
masnrockCommented:
Do you have any other remote access tools? Such as VNC? You could also pop a batch file on each machine just browsing the networking and using the C$ share.

However, the easiest thing would've just been to use ADS or something along those lines, granted I know you said you didn't want to do it.

Tell us what options you have available to you.
Steve KnightIT ConsultancyCommented:
Are there no login scripts?
Steve KnightIT ConsultancyCommented:
If you really want to do it remotely as the user currently logged in then try running an at command for each computer:

at \\remotepc 13:00 /interactive "net use s: .etc."

or try the free psexec from sysinternals.

Steve
jeff_trentCommented:
Well, Telnet is right out the window, so you'll have to decide on another solution.  If it were me, I'd do what dragon-it suggested and run an AT command on each PC to schedule a task.  You can drop a batch file on each PC via the C$ share as masnrock suggested, then use AT's network syntax to built the scheduled task on each PC.  This way, it minimizes your effort, as you only create the batch file once, and dump it to each PC.  Then you can create a batch file of your own with 50 lines of AT \\COMPUTERNAME to create the scheduled task.
Sam PanwarSr. Server AdministratorCommented:
Sam PanwarSr. Server AdministratorCommented:
Download telnet.zip file and you can also able to run some shell scripts.
the commands from VB. You can download a Telnet Client here that will show you how it is done and then build on it for your own purposes.

http://www.codearchive.com/list.php?go=0214

http://www.computing.net/cgi-bin/AT-search.cgi?mode=concept&search=Telnet&forum=Programming&sp=sp&x=0&y=0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.