-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathInvoke-Install.ps1
152 lines (122 loc) Β· 5.22 KB
/
Invoke-Install.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# ----------
# Variables
# ----------
# Chocolatey packages
$ChocoPackages = @( '7zip.install',
'act-cli',
'advanced-ipscanner',
'azure-cli',
'bind-toolsonly',
'cascadia-code-nerd-font',
'choco-cleaner',
'chocolateygui',
'cpu-z',
'crystaldiskinfo',
'curl',
'discord',
'docker-desktop',
'etcher',
'gimp',
'git',
'go',
'golang',
'google-drive-file-stream',
'gpg4win',
'greenshot',
'gsudo',
'icue',
'microsoft-edge-insider-dev',
'microsoft-windows-terminal',
'nodejs',
'nordvpn',
'nvidia-display-driver',
'postman',
'powershell-core',
'powertoys',
'pulumi',
'python3',
'qbittorrent',
'rpi-imager',
'sonos-controller',
'streamdeck',
'spotify',
'sysinternals',
'vlc',
'vscode',
'whatsapp',
'windirstat')
# PowerShell modules
$PwshModules = @( 'PSReadLine',
'Terminal-Icons',
'oh-my-posh',
'posh-git')
# VS Code extensions
$VsCodeThemes = @( 'GitHub.github-vscode-theme')
$VsCodeIcons = @( 'vscode-icons-team.vscode-icons')
$VsCodeExtensionsMs = @( 'docsmsft.docs-markdown',
'docsmsft.docs-preview',
'ms-azuretools.vscode-azurefunctions',
'ms-azuretools.vscode-azureresourcegroups',
'ms-azuretools.vscode-bicep',
'ms-azuretools.vscode-docker',
'ms-dotnettools.csharp',
'ms-dotnettools.vscode-dotnet-runtime',
'ms-vscode-remote.remote-containers',
'ms-vscode-remote.remote-ssh',
'ms-vscode-remote.remote-ssh-edit',
'ms-vscode-remote.remote-wsl',
'ms-vscode-remote.vscode-remote-extensionpack',
'ms-vscode.azurecli',
'ms-vscode.powershell')
$VsCodeExtensionsCustom = @('DavidAnson.vscode-markdownlint',
'eamodio.gitlens',
'hediet.vscode-drawio',
'streetsidesoftware.code-spell-checker')
# ----------
# Chocolatey
# ----------
# Install
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://community.chocolatey.org/install.ps1'))
# Show version
choco info
choco list -li
# Confirm future prompts automatically
choco feature enable -n allowGlobalConfirmation
# Show preinstalled apps
Get-AppxPackage -AllUsers | Select-Object Name, PackageFullName, Version, NonRemovable, SignatureKind | Format-Table
# Uninstall Edge stable channel
$EdgeVersion = (Get-AppxPackage "Microsoft.MicrosoftEdge.Stable" -AllUsers).Version
$EdgeSetupPath = [Environment]::GetEnvironmentVariable("ProgramFiles(x86)") + '\Microsoft\Edge\Application\' + $EdgeVersion + '\Installer\setup.exe'
& $EdgeSetupPath --uninstall --system-level --verbose-logging --force-uninstall
# Uninstall Windows Terminal, manage it through Chocolatey
Get-AppxPackage Microsoft.WindowsTerminal | Remove-AppPackage
# Install choco packages
$ChocoPackages | ForEach-Object { choco install $_ }
# Show installed packages
choco list -li
# -------
# VS Code
# -------
# Theme
$VsCodeThemes | ForEach-Object { code --install-extension $_ }
# Icons
$VsCodeIcons | ForEach-Object { code --install-extension $_ }
# Extension (MS)
$VsCodeExtensionsMs | ForEach-Object { code --install-extension $_ }
# Extensions (custom)
$VsCodeExtensionsCustom | ForEach-Object { code --install-extension $_ }
# List extensions
code --list-extensions
# Show status
code --status
# ----------
# PowerShell
# ----------
# Install Package Management provider
Install-PackageProvider -Name NuGet -Force;
# Install modules
$PwshModules | ForEach-Object { Install-Module -Name $_ -Force -Verbose }
# Import modules
$PwshModules | ForEach-Object { Import-Module -Name $_ -Force -Verbose }
# List installed modules
Get-Module