📌  相关文章
📜  管理员密码 powershell 脚本 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:12.943000             🧑  作者: Mango

代码示例1
$User = "Username"
$Password = "Password" | ConvertTo-SecureString -asPlainText -Force
$MyCredential = New-Object System.Management.Automation.PSCredential($User,$Password)
 
Start-Process -WindowStyle Hidden powershell.exe -Credential $MyCredential -ArgumentList '-noprofile -command &{Start c:\program\program.exe -Verb RunAs}'