-
Notifications
You must be signed in to change notification settings - Fork 1
/
install-pwsh.ps1
30 lines (25 loc) · 1023 Bytes
/
install-pwsh.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<#
Run this with:
Invoke-Expression (invoke-webrequest -uri 'https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/install-pwsh.ps1') ; install-pwsh
# Include IDE
Invoke-Expression (invoke-webrequest -uri 'https://raw.githubusercontent.com/DarwinJS/CloudyWindowsAutomationCode/master/install-pwsh.ps1') ; install-pwsh -includeide
#>
Function install-pwsh {
Param (
[Switch]$includeide
)
If (!(Test-Path env:chocolateyinstall))
{
write-host "Installing Chocolatey..."
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
}
If ($includeide)
{
choco upgrade -y powershell-core visualstudiocode
code --install-extension ms-vscode.PowerShell
Write-Host "*********************************************************************"
Write-Host " How to setup core as the default PowerShell for visual studio code: "
Write-Host " https://github.com/PowerShell/PowerShell/blob/master/docs/learning-powershell/using-vscode.md"
Write-Host
}
}