hebedich 通过本文主要向大家介绍了powershell程序文件,powershell运行程序,powershell,windows powershell,powershell是什么等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
假设你经常需要编辑自己的”hosts”文件,这时你也许会手动在记事本中打开它。这个文件只允管理员成员编辑,普通的实例还无法操作。
这段代码它能让你很容易调整权限打开所有程序。
function Show-HostsFile
{
$Path="$env:windir\system32\drivers\etc\hosts"
Start-Process -FilePath notepad -ArgumentList $Path -Verb runas
}
</div>
支持所有PS版本
</div>
