【发布时间】:2013-01-08 12:08:50
【问题描述】:
我正在运行这个命令
Invoke-WmiMethod -ComputerName $machine -Credential $cred -Impersonation 3 -Path Win32_process -Name create -ArgumentList "powershell.exe -ExecutionPolicy Unrestricted -File C:\Windows_Updates.ps1" -Verbose
唯一的问题在于远程机器,它被创建为后台进程。当我打开任务管理器时,我可以看到 powershell.exe,但我无法确定发生了什么。我几乎到处都看过,但找不到解决方案。
基本上我需要远程执行powershell文件。我愿意使用其他可以看到脚本正在运行的解决方案。
【问题讨论】:
标签: windows wmi powershell-2.0