0
我首先想道歉重新發布question。我試圖啓動一個賞金,但我有this問題,似乎並沒有解決它。訪問被拒絕的錯誤使用啓動過程
不管怎麼說
我正試圖執行的代碼行
Start-Process : This command cannot be executed due to the error:
Access is denied.
這是正在執行的代碼時出現以下錯誤
$username = "domain\username"
$passwordPlainText = "password"
$password = ConvertTo-SecureString "$passwordPlainText" -asplaintext -force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $username,$password
$powershellArguments = "D:\path\ps.script.ps1", "arg1", "arg2", "arg3", "arg4"
Start-Process "powershell.exe" -credential $cred -ArgumentList $powershellArguments -wait
- 此代碼工作正常時,在本地執行,但不通過vbs調用WMI
- 臺兩臺計算機在提供相同的域和地址範圍
- 的用戶名和密碼存在有在兩臺機器上
- 我已經既沒有
-wait
但是沒有作品,並且由於用戶是特權,我試過管理員權限ð寧願保持它
我不是在VBS精通,但是我通過腳本去,掏出了我認爲是用於在遠程計算機上執行的命令行。這個腳本可以在不出錯的情況下爲數千個其他任務工作
你可以給vbs的WMI代碼嗎? – JPBlanc
@JPBlanc我已經在vbs中添加了 – mhopkins321