嗨,有人请帮助我作为管理员从vbscript运行powershell
VB脚本
MyPath =“c:\ temp \ folder1”Dim objShell设置objShell = CreateObject(“Wscript.Shell”)objShell.run(“powershell.exe -noexit -file C:\ temp \ power.ps1”&MyPath)
PowerShell power.ps1
C:\ temp \ psfile.exe $ args [0] -c
1 回答
在VBScript中Set用于对象;所以改变
至