Noonisy
Win11 PowerShell
2025-01-04
阅读:498

Win11 PowerShell


PowerShell 和 Windows PowerShell 不一样

微软商店安装 PowerShell1
# 启动
pwsh

# 设置配置文件
notepad $PROFILE
# code $PROFILE  # 通过 vscode 打开

# 设置代理
function v2on {
    $env:http_proxy = "http://127.0.0.1:7897"
    $env:https_proxy = "http://127.0.0.1:7897"
    Write-Output "Proxy set to http://127.0.0.1:7897"
}

# 取消代理
function v2off {
    Remove-Item Env:http_proxy
    Remove-Item Env:https_proxy
    Write-Output "Proxy settings removed"
}
最后编辑于:2025 年 01 月 09 日 22:44
邮箱格式错误
网址请用http://或https://开头