WindowsTerminal 配置标签页(快速使用PowerCli)

需求

  • 避免每次都需要手动输入密码、手动填写信息才能访问vcenter。
  • 结合WindowsTerminal快速创建标签页,需要时一键开启Powercli。

解决

编写启动PowerCli的bat脚本

内容如下

@echo off
powershell -NoExit -ExecutionPolicy Bypass -Command "Connect-VIServer -Protocol https -User '[email protected]' -Password '你的密码' -Server '192.168.101.249'"

新建WindowsTerminal的标签页

将上一步的脚本存储在方便使用的路径下,新建标签页填写命令行:
WindowsTerminal 配置标签页(快速使用PowerCli)_第1张图片

成功截图

WindowsTerminal 配置标签页(快速使用PowerCli)_第2张图片
WindowsTerminal 配置标签页(快速使用PowerCli)_第3张图片

完成

你可能感兴趣的:(Windows,运维,运维,windows)