[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Windows batch files

Posted on 2016-11-17
3
Medium Priority
?
98 Views
Last Modified: 2016-11-17
I need to create a batch file that runs on a machine and connects network drives. The machine and file server are on different domains but are trusted.

The batch file needs to ask the user for credentials then pass those credentials for authentication.

Any pointers?
0
Comment
Question by:IST
[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
3 Comments
 
LVL 29

Accepted Solution

by:
Michael Pfister earned 2000 total points
ID: 41891598
set /p NETUSER=Please enter user name for connection:
If defined NETUSER net use * \\SERVER\Share /user:OTHERDOMAIN\%NETUSER% 

Open in new window


This will prompt the user for a user name and pass it to the net use command. replace SERVER, Share and OTHERDOMAIN with your values
0
 
LVL 29

Expert Comment

by:Michael Pfister
ID: 41891601
On the other hand since there is a trust you should be able to grant the user from domain A access to ressources in domain B.
No need to prompt for username...
0
 

Author Closing Comment

by:IST
ID: 41891617
Great, works fine....
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

This article will review the basic installation and configuration for Windows Software Update Services (WSUS) in a Windows 2012 R2 environment.  WSUS is a Microsoft tool that allows administrators to manage and control updates to be approved and ins…
Windows Server 2003 introduced persistent Volume Shadow Copies and made 2003 a must-do upgrade.  Since then, it's been a must-implement feature for all servers doing any kind of file sharing.
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

649 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