How to use BCP Utility queryout in a network path with crededential (login required) for SQL Server
The BCP utility does not have option to provide credentials for network path authentication where output file will reside. One alternative is to map the network path as local drive with &quot;net use&quot; providing User/password to authenticate. Then use local drive in BCP command.
e.g.
net use e: \IPAddress\d$\  /user:&lt;domain\login&gt;  /savecred