写一个脚本让powershell以管理员身份运行映射网络代码
·
您可以使用下面的代码创建一个PowerShell脚本来以管理员身份运行映射网络代码:
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
$arguments = "& '" + $myinvocation.mycommand.definition + "'"
Start-Process powe
更多推荐



所有评论(0)