如何使用psexec在天蓝色vm上进行远程执行? [英] How to use psexec for remoting executing on azure vm?

查看:100
本文介绍了如何使用psexec在天蓝色vm上进行远程执行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用工具psexec在azure vm(win server 2016)上打开.txt文件,但总是出错:"找不到网络路径。确保在(publicIP)上启用了默认的admin $ share。"



即使我去了到azure vm并使用"net share admin $"启用admin $,仍会收到此错误。



代码如下:



psexec \\(publicIP)-u(用户名)-p(密码)-i -d记事本



你能给我一些建议吗?我错过了什么?

解决方案

 


<我做了一个repro,它对我有用。源和目标都是Azure VM,但它们位于不同的VNET中,我通过公共Internet访问。 



确保Windows防火墙并且目标VM上的NSG允许端口445. 


使用FQDN而不是IP地址。 


我没有提及执行命令时的用户名和密码。 


使用管理员权限打开CMD并执行此命令:


psexec \\karthik123456789。 westus.cloudapp.azure.com -i -d notepad


C:\ Users\karthik\Documents\PSTools> psexec \\karthik123456789.westus.cloudapp.azu

re.com -i -d notepad



PsExec v2.2 - 远程执行进程

版权所有( C)2001-2016 Mark Russinovich

Sysinternals - www.sysinternals.com



$
记事本开始于karthik123456789 .westus.cloudapp.azure.com,流程ID为23

00。


---------------------------------- -------------------------------------------------- -----------------------


如果您发现这篇文章有帮助,请给它一个"有用的"投票。 


如果有帮助,请记得将回复标记为答案。


< cite style =" margin:0in; font-family:Calibri; font -size:9.0pt;颜色:#595959;"> < / cite>






 


I want to use the tool psexec to open an .txt file on the azure vm(win server 2016), but always error: "The network path was not found. Make sure the default admin$ share is enabled on (publicIP)."

Even if I go to the azure vm and enable the admin$ by using "net share admin$", still receive this error.

the code like below:

psexec \\(publicIP) -u(username) -p (password) -i -d notepad

can you give me some suggestions? do I miss something?

解决方案

Hi, 

I did a repro and it worked for me. Source and Destination are both Azure VMs but they are in different VNET and I am reaching over public Internet. 

Make sure the Windows Firewall and the NSG on the destination VMs allow port 445. 

Use FQDN instead of the IP address. 

I didn't mention user name and password while executing the command. 

Open CMD with admin privilege and execuite this command:

psexec \\karthik123456789.westus.cloudapp.azure.com -i -d notepad

C:\Users\karthik\Documents\PSTools>psexec \\karthik123456789.westus.cloudapp.azu
re.com -i -d notepad

PsExec v2.2 - Execute processes remotely
Copyright (C) 2001-2016 Mark Russinovich
Sysinternals - www.sysinternals.com


notepad started on karthik123456789.westus.cloudapp.azure.com with process ID 23
00.

-----------------------------------------------------------------------------------------------------------

If you found this post helpful, please give it a "Helpful" vote. 

Please remember to mark the replies as answers if they help.

<cite style="margin:0in;font-family:Calibri;font-size:9.0pt;color:#595959;"> </cite>

 


这篇关于如何使用psexec在天蓝色vm上进行远程执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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