首页 > 解决方案 > Powershell 预览保持自动连接到 Cloud shell

问题描述

当我使用 Windows 终端启动它时,我遇到了 powershell 预览 ( pwsh ) 一直连接到 azure shell 云的问题。Windows 终端中的 shell 设置:

{
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "name": "Windows PowerShell Preview",
                "commandline": "pwsh",
                "hidden": false
            },

但是,当我pwsh在 cmd 中启动时,它不会连接到 azure cloud shell,而只是在本地进行 powershell 预览。我不确定出了什么问题。

标签: powershell

解决方案


我刚刚发现了问题,我使用与 azure cloud shell 相同的 uuid,不确定它存储在哪里。我只是为 powershell 预览生成新的 uuid,然后使用 pwsh 启动它就可以了。


推荐阅读