且构网

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

在远程计算机文件系统上执行 powershell 脚本

更新时间:2022-12-23 12:10:16

如果你试试这个方法呢?

And if you try this method?

在本地机器上运行这个命令:

Run this command on your local machine :

$computer = "COMP1"    
([WMICLASS]"\\$computer\ROOT\CIMV2:Win32_Process").Create('C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden -File "script.ps1"')