Windows远程执行cmd命令的9种方法
使用 ansible 批量管理 windows主机
使用powershell和winrm实现Windows主机间批量操作
WMIC Microsoft Windows Management Instrumentation
利用wmic对Windows主机批量执行脚本
WMIC介绍:
==> 在远程机器 "ABC" 创建计划任务 "report",每个星期运行 notepad.exe。
SCHTASKS /Create /S ABC /U user /P password /RU runasuser /RP runaspassword /SC WEEKLY /TN report /TR notepad.exe
通过共享文件夹分享应用脚本,远端目标机定时判断标志位来判断是否执行
\hostname\c$
通过登录应用软件(数据库)调用操作系统命令方式执行脚本
Powershell介绍
附录:
mshta 调用vbscript/javascript:
mshta vbscript:window.execScript("alert('hello world!');","javascript")
mshta vbscript:execute("msgbox ""one BOX"":msgbox ""two BOX"":window.close")
mshta javascript:window.execScript("msgBox('hello world!'):window.close","vbs")