【问题标题】:Powershell install all vscode extensions on a new PCPowershell 在新 PC 上安装所有 vscode 扩展
【发布时间】:2021-07-28 10:49:09
【问题描述】:

我有当前脚本,可以在新计算机上安装 Chocolatey,并安装我的所有主要应用程序并确认它们是最新的:

#Requires -RunAsAdministrator

# Install chocolatey packet manager
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

# Install needed packages (these can be changed to suit your needs)
choco install brave discord microsoft-teams microsoft-office-deployment vscode visualstudio2019community sql-server-management-studio tableau-desktop git -y

# Confirm all software is up to date
choco update all -y

我想知道是否有一种方法可以在此脚本的末尾将我所有的 vscode 扩展安装到新的电脑(Windows)上。

【问题讨论】:

  • 听起来您需要在计算机之间同步设置。可能有一些扩展(如果 VS Code 本身不这样做)。
  • @Bill_Stewart 感谢您的评论,我设法用 powershell 脚本找到了一条捷径

标签: windows powershell visual-studio-code


【解决方案1】:

如果有人需要,可以使用 PowerShell 编写一个很酷的解决方案。 This is the project on Github. / PowerShell Gallery

总而言之,VS-Code 和扩展是这样安装的:

Install-Script Install-VSCode; Install-VSCode.ps1 -AdditionalExtensions 'ms-azuretools.vscode-azurefunctions', 'ms-python.python'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-07
    • 2020-08-10
    相关资源
    最近更新 更多