windows - Powershell 在新 PC 上安装所有 vscode 扩展
问题描述
我有当前脚本,它在新计算机上安装巧克力并安装我所有的主要应用程序并确认它们是最新的:
#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 扩展安装到新的 PC(Windows)上。
解决方案
如果有人需要它,可以使用 PowerShell 编写一个很酷的解决方案。这是 Github 上的项目。/ PowerShell 画廊
总之,VS-Code 和扩展是这样安装的:
Install-Script Install-VSCode; Install-VSCode.ps1 -AdditionalExtensions 'ms-azuretools.vscode-azurefunctions', 'ms-python.python'
推荐阅读
- ruby-on-rails - Rails 引擎中的 SCSS @import 语句导致错误:`Aborted (core dumped)`
- spring - 如何验证具有绑定结果的表单?
- sql-server - 为我们的 M1 erp 软件创建标签的问题
- authentication - 如何从 Chrome 中删除所有 SO 痕迹
- javascript - d3面积堆积折线图
- python - Django 对象过滤器
- rstudio - 无法从 RStudio 用西班牙语编织 PDF 文件(在 Centos 7 上)
- django - Django - 序列化程序返回更新数据但不修改数据库
- selenium - 如何使用 selenium 在 Java 中的 firefox 驱动程序中添加扩展
- google-sheets - vlookup(importrange) 函数在另一个电子表格的查询结果表中找不到数据