在远程机器上使用凭据进行 xcopy [英] xcopy with credentials on remote machine

查看:31
本文介绍了在远程机器上使用凭据进行 xcopy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过其 IP 地址访问不同域上的远程服务器.在运行命令中我输入了以下内容

I am trying to access a remote server on a different domain through its IP address. In run command I entered the following

\XXX.XXX.XXX.XXXC$Program Files

我得到一个弹出窗口,要求输入用户名和密码.我进入它,并访问了路径.当我再次尝试访问该文件夹时,它不会询问我的密码.但是当我重新启动时,它确实再次弹出.

I get a pop up window asking for username and password. I enter it, and accessed the path. When I try accessing the folder again it do not ask for my password. But when I restart, it does give the popup again.

有没有办法添加我的凭据?假设我的域用户名是 MyDomainRapsyTree.我尝试了以下方法:

Is there a way to add my credentials?? Lets say my domainusername is MyDomainRapsyTree. I tried the following:

cmdkey /generic:TERMSRV/YYY.YY.YYY.YYY /user:YourDomain
apsalands /pass:secretPass

正在添加凭据.但是我仍然会弹出用户名和密码.

The credentials are getting added. But I am still getting the pop up for username and password.

实际上,我正在尝试 xcopy 此服务器上不同域的一些文件.但我需要用不同的凭据来做.我正在使用批处理文件.任何指针都会有很大帮助.如果我不清楚,请告诉我.我正在使用 Windows 7 谢谢!

Actually I am trying to xcopy some files on this server on different domain. But I need to do it with different credentials. I am using batch files. Any pointers will be of great help. Let me know if I am not clear. I am using Windows 7 Thanks!

推荐答案

你只需要映射一个网络驱动器:

You just have to map a network drive:

net use Z: \XXX.XXX.XXX.XXXC$ password /user:domainusername 

如果您希望驱动器在下次登录时重新连接,请添加选项 /persistent:yes

If you want the drive to reconnect at next logon, add the option /persistent:yes

这篇关于在远程机器上使用凭据进行 xcopy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆