windows脚本

cmd脚本

结束后不退出窗口

cmd

设置环境变量

# 为当前用户设置环境变量
setx HTTP_PROXY http://127.0.0.1:8888

# 设置系统环境变量
setx /M HTTPS_PROXY http://127.0.0.1:8888

查看端口占用

# 查看端口53占用进程
# 先找到占用端口的进程id
netstat -ano | findstr "53"
tasklist | findstr "进程id"

powershell脚本

结束后不退出窗口

"Any key to exit." ;
[Console]::Readkey() | Out-Null ;
Exit ;
posted @ 2022-12-02 12:23  weiwei5987  阅读(86)  评论(0编辑  收藏  举报