且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用批处理文件连接到其他服务器。

更新时间:2023-01-22 10:10:31

为了远程运行命令,你需要一些协议来传递信息和命令。看一下这些产品 [ ^ ]用于安全的远程shell。
In order to run commands remotely you need some protocol to transfer information and commands. Take a look at some of these offerings[^] for secure remote shell.






您可以请求远程主机远程执行操作(在后台或不在后台),就像您在主机上使用PowerShell一样,或者如果您确实需要较旧的WMIC批处理文件。 />


例如:



c:\ wmic / node:hostname进程调用createcall c :\any_file



其中hostname =您要在网络内连接的主机(名称或IP)

any_file =您要使用的文件



您可以使用buildIn WMIC API或启动/停止流程





在此处阅读更多信息 http://technet.microsoft.com/en-us/ library / bb742610.aspx [ ^ ]



问候

Hermitagup
Hi,

You can "ask" remote host to perform action remotely (in background or not), just like you are on host by using PowerShell or if you really need batch file by "older" WMIC.

example:

c:\wmic /node:hostname process call create "call c:\any_file"

where hostname=host you want to connect inside your network (Name or IP)
any_file=file you want to use

You can use buildIn WMIC API or start / stop processes


Read more here http://technet.microsoft.com/en-us/library/bb742610.aspx[^]

Regards
Hermitagup