假设你经常需要编辑自己的”hosts”文件,这时你也许会手动在记事本中打开它。这个文件只允管理员成员编辑,普通的实例还无法操作。
这段代码它能让你很容易调整权限打开所有程序。
function Show-HostsFile
{
$Path="$env:windirsystem32driversetchosts"
Start-Process -FilePath notepad -ArgumentList $Path -Verb runas
}
支持所有PS版本
假设你经常需要编辑自己的”hosts”文件,这时你也许会手动在记事本中打开它。这个文件只允管理员成员编辑,普通的实例还无法操作。
这段代码它能让你很容易调整权限打开所有程序。
function Show-HostsFile
{
$Path="$env:windirsystem32driversetchosts"
Start-Process -FilePath notepad -ArgumentList $Path -Verb runas
}
支持所有PS版本

2023-02-27
0万阅读

2023-02-27
0万阅读

2023-02-26
0万阅读

2023-02-22
4万阅读

2023-02-12
9万阅读

2023-01-18
4万阅读

2023-01-18
4万阅读

2023-01-17
5万阅读

2023-01-08
5万阅读

2023-01-07
2万阅读

2023-02-27
0万阅读

2023-02-27
0万阅读

2023-02-26
0万阅读

2023-02-22
4万阅读

2023-02-12
9万阅读

2023-01-18
4万阅读

2023-01-18
4万阅读

2023-01-17
5万阅读

2023-01-08
5万阅读

2023-01-07
2万阅读