Skip to content

Commit 1e2fbef

Browse files
authored
making script for dev virtual machines on dev.msft
script for https://developer.microsoft.com/en-us/windows/downloads/virtual-machines
1 parent ee2a2cf commit 1e2fbef

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

dev_virtualmachine_createScript.ps1

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Description: Boxstarter Script
2+
# Author: Microsoft
3+
# Common dev settings for desktop app development
4+
5+
Disable-UAC
6+
7+
# Get the base URI path from the ScriptToCall value
8+
$bstrappackage = "-bootstrapPackage"
9+
$helperUri = $Boxstarter['ScriptToCall']
10+
$strpos = $helperUri.IndexOf($bstrappackage)
11+
$helperUri = $helperUri.Substring($strpos + $bstrappackage.Length)
12+
$helperUri = $helperUri.TrimStart("'", " ")
13+
$helperUri = $helperUri.TrimEnd("'", " ")
14+
$helperUri = $helperUri.Substring(0, $helperUri.LastIndexOf("/"))
15+
$helperUri += "/scripts"
16+
write-host "helper script base URI is $helperUri"
17+
18+
function executeScript {
19+
Param ([string]$script)
20+
write-host "executing $helperUri/$script ..."
21+
iex ((new-object net.webclient).DownloadString("$helperUri/$script"))
22+
}
23+
24+
#--- Setting up Windows ---
25+
executeScript "SystemConfiguration.ps1";
26+
executeScript "FileExplorerSettings.ps1";
27+
executeScript "RemoveDefaultApps.ps1";
28+
executeScript "CommonDevTools.ps1";
29+
30+
#--- Tools ---
31+
#--- Installing VS and VS Code with Git
32+
# See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
33+
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
34+
# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio#list-of-workload-ids-and-component-ids
35+
# visualstudio2017community
36+
# visualstudio2017professional
37+
# visualstudio2017enterprise
38+
39+
choco install -y visualstudio2017community --package-parameters="'--add Microsoft.VisualStudio.Component.Git'"
40+
Update-SessionEnvironment #refreshing env due to Git install
41+
42+
#--- UWP Workload and installing Windows Template Studio ---
43+
choco install -y visualstudio2017-workload-azure
44+
choco install -y visualstudio2017-workload-universal
45+
choco install -y visualstudio2017-workload-manageddesktop
46+
choco install -y visualstudio2017-workload-nativedesktop
47+
48+
executeScript "WindowsTemplateStudio.ps1";
49+
executeScript "GetUwpSamplesOffGithub.ps1";
50+
51+
executeScript "WSL.ps1";
52+
53+
#--- reenabling critial items ---
54+
Enable-UAC
55+
Enable-MicrosoftUpdate
56+
Install-WindowsUpdate -acceptEula

0 commit comments

Comments
 (0)