my-vscode-powershell.ps1

<#PSScriptInfo
 
.VERSION 1.2
 
.GUID 539e5585-7a02-4dd6-b9a6-5dd288d0a5d0
 
.AUTHOR Microsoft
 
.COMPANYNAME Microsoft Corporation
 
.COPYRIGHT (c) Microsoft Corporation
 
.TAGS install vscode installer
 
.LICENSEURI https://github.com/PowerShell/vscode-powershell/blob/develop/LICENSE.txt
 
.PROJECTURI https://github.com/PowerShell/vscode-powershell/blob/develop/scripts/Install-VSCode.ps1
 
.ICONURI
 
.EXTERNALMODULEDEPENDENCIES
 
.REQUIREDSCRIPTS
 
.EXTERNALSCRIPTDEPENDENCIES
 
.RELEASENOTES
    20/03/2018 - fix OS detection to prevent error
    --
    28/12/2017 - added functionality to support 64-bit versions of VSCode
    & support for installation of VSCode Insiders Edition.
    --
    Initial release.
#>


<#
.SYNOPSIS
    Installs Visual Studio Code, the PowerShell extension, and optionally
    a list of additional extensions from chocolatey repo
 
.DESCRIPTION
    Installs Visual Studio Code, the PowerShell extension, and optionally
    a list of additional extensions from chocolatey repo
 
.PARAMETER TBD
    Now it has no parameters
 
.EXAMPLE
    Install-VSCode.ps1
 
    Installs Visual Studio Code (64-bit), the PowerShell extension, and additional
    extensions from choco
 
.EXAMPLE
    My-VSCode-Powershell.ps1
 
    Installs Visual Studio Code Insiders Edition (64-bit) and then launches the editor
    after installation completes.
 
#>



Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
cinst -y vscode
refreshenv
code --install-extension ms-vscode.PowerShell