Skip to content

adding common scripts for use by multiple dev scenario scripts #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 61 commits into from
Aug 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
6b63f45
Update dev_app.ps1
crutkas Jun 7, 2018
f246a7a
Create helper_InstallWts.ps1
crutkas Jun 8, 2018
f382615
Update README.md
crutkas Jun 8, 2018
a2401e5
Update and rename helper_InstallWts.ps1 to helper_WindowsExplorerSett…
crutkas Jun 8, 2018
3c9ac8f
Update dev_app.ps1
crutkas Jun 8, 2018
1331882
Update dev_app.ps1
crutkas Jun 8, 2018
91d0d69
Update dev_app.ps1
crutkas Jun 8, 2018
63b00c2
Update dev_app.ps1
crutkas Jun 8, 2018
4e42b20
reset
crutkas Jun 8, 2018
2a18389
adjusting
crutkas Jun 8, 2018
813f61c
fixing file name issue
crutkas Jun 8, 2018
40eaa2c
Initial attempt at segmenting stuff off
crutkas Jun 10, 2018
d41459a
minor adjustments
crutkas Jun 11, 2018
0348008
resetting readme to point at mater and new branch
crutkas Jun 11, 2018
7d17edc
Merge branch 'BreakUpScripts' into TestRemotePs
crutkas Jun 11, 2018
65aad7d
Merge pull request #51 from crutkas/TestRemotePs
crutkas Jun 11, 2018
ec95e6e
adjusting script url and adding in direct PS optional features
crutkas Jun 13, 2018
0b8533a
Update README.md
crutkas Jun 13, 2018
5baef9b
Update dev_app.ps1
crutkas Jun 13, 2018
05bc978
Update dev_app.ps1
crutkas Jun 13, 2018
29e5567
Update dev_app.ps1
crutkas Jun 13, 2018
df15d0e
Update dev_app.ps1
crutkas Jun 13, 2018
a5fe456
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
2927cbe
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
4b15fa6
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
58b5e9a
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
28bb63f
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
525d779
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
40a12b7
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
d42f633
Update RemoveDefaultApps.ps1
crutkas Jun 13, 2018
9230b59
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
6447ff0
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
bc1aae2
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
ed16e09
Update WindowsTemplateStudio.ps1
crutkas Jun 13, 2018
8ef091b
adding write host
crutkas Jun 17, 2018
e989891
updated remove default app script, still has issue if apps are updati…
crutkas Jun 17, 2018
0316142
trying out wsl and hyper-v install with direct call to system
crutkas Jun 17, 2018
103cfbd
https://github.com/Microsoft/windows-dev-box-setup-scripts/issues/53
crutkas Jun 17, 2018
4149896
merge issue
crutkas Jun 17, 2018
59b56ad
forcing a no reset for hyper-v and wsl
crutkas Jun 17, 2018
4cf944f
reverting wsl/hyper-v
crutkas Jun 17, 2018
dbabc38
adding vs code
crutkas Jun 17, 2018
7bd2cca
tryign to break script up into work groups and config the version of VS
crutkas Jun 17, 2018
fb77734
attempting to config
crutkas Jun 17, 2018
354434d
f
crutkas Jun 17, 2018
bd06819
removing -y
crutkas Jun 17, 2018
ba07454
back to basics
crutkas Jun 17, 2018
aaca353
trying to do git install
crutkas Jun 17, 2018
c67adc5
small tweak
crutkas Jun 17, 2018
46236ae
VM still wants to restart. lets try this again.
crutkas Jun 17, 2018
d255f92
change to upgrade
crutkas Jun 17, 2018
8214f7a
setting git to verify
crutkas Jun 17, 2018
d4f74dc
another adjustment
crutkas Jun 18, 2018
d580bae
adding back in workloads to test
crutkas Jun 18, 2018
e8433df
reenabling everything, executes while on a decent connection and comp…
crutkas Jun 18, 2018
912b8bb
moving the setting up Windows as removind default apps doesn't seem t…
crutkas Jun 18, 2018
2c12288
continuing with creating core scripts and updating scenario scripts t…
yodurr Jul 26, 2018
f6fc54b
additional logging, commenting out devmode setting
yodurr Jul 26, 2018
690c67c
adding dev mode back in
yodurr Jul 26, 2018
56ea566
merging dev_web with master
yodurr Jul 26, 2018
833acbe
prepping branch for merge to master
yodurr Jul 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 32 additions & 58 deletions dev_app.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,41 @@

Disable-UAC

#--- Windows Subsystems/Features ---
#choco install -y Microsoft-Windows-Subsystem-Linux -source windowsfeatures
#choco install -y Microsoft-Hyper-V-All -source windowsFeatures
#choco install -y sysinternals
#choco install -y docker-for-windows

#--- Configuring Windows properties ---
#--- Windows Features ---
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions

#--- File Explorer Settings ---
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2

#--- Enabling developer mode on the system ---
Set-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\AppModelUnlock -Name AllowDevelopmentWithoutDevLicense -Value 1

#--- VS 2017 uwp and azure workloads + git tools ---
# see if we can't get calling URL somehow, that would eliminate this need
# should move to a config file
$user = "Microsoft";
$baseBranch = "BreakUpScripts";
$finalBaseHelperUri = "https://raw.githubusercontent.com/$user/windows-dev-box-setup-scripts/$baseBranch/scripts";

function executeScript {
Param ([string]$script)
write-host "executing $finalBaseHelperUri/$script ..."
iex ((new-object net.webclient).DownloadString("$finalBaseHelperUri/$script"))
}

#--- Setting up Windows ---
executeScript "SystemConfiguration.ps1";
executeScript "FileExplorerSettings.ps1";
executeScript "RemoveDefaultApps.ps1";
executeScript "CommonDevTools.ps1";

#--- Tools ---
#--- Installing VS and VS Code with Git
# See this for install args: https://chocolatey.org/packages/VisualStudio2017Community
# https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community
# https://docs.microsoft.com/en-us/visualstudio/install/use-command-line-parameters-to-install-visual-studio#list-of-workload-ids-and-component-ids
choco install visualstudio2017community --package-parameters "--add Microsoft.VisualStudio.Workload.Azure --add Microsoft.VisualStudio.Component.Git"
RefreshEnv

choco install visualstudio2017-workload-universal

#--- grabbing latest UWP Samples off Github ---
RefreshEnv
cd $env:USERPROFILE\desktop
mkdir UwpSamples
cd UwpSamples
git clone https://github.com/Microsoft/Windows-universal-samples/

# installing Windows Template Studio VSIX
#choco was claiming dev 15 can't do this anymore for vsix... odd hasn't been fixed yet
#Install-ChocolateyVsixPackage -PackageName "Windows Template Studio" -VsixUrl $wtsFileUrl.source

$requestUri = 'https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery'
$requestBody = '{"flags":"262","filters":[{"criteria":[{"filterType":"10","value":"windows template studio"}],"sortBy":"0","sortOrder":"2","pageSize":"25","pageNumber":"1"}]}'
$requestHeaders = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$requestHeaders.Add('Accept','application/json; api-version=3.2-preview.1')
$requestHeaders.Add('Content-Type','application/json; charset=utf-8')

$results = Invoke-WebRequest -Uri $requestUri -Method POST -Headers $requestHeaders -Body $requestBody -UseBasicParsing

$jsonResults = $results.Content | ConvertFrom-Json
$wtsResults = $jsonResults.results[0].extensions | where {$_.extensionName -eq "WindowsTemplateStudio"}
$wtsFileUrl = $wtsResults.versions[0].files | where {$_.assetType -eq "Microsoft.Templates.2017.vsix"}

$wtsVsix = [System.IO.Path]::GetFileName($wtsFileUrl.source)
$wtsFullPath = [System.IO.Path]::Combine((Resolve-Path .\).Path, $wtsVsix);
Invoke-WebRequest -Uri $wtsFileUrl.source -OutFile $wtsVsix
$vsixInstallerFile = Get-Childitem -Include vsixinstaller.exe -Recurse -Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\"
$wtsArgList = $wtsFullPath + " /q"

$vsixInstallerResult = Start-Process -FilePath $vsixInstallerFile.FullName -ArgumentList $wtsArgList -Wait -PassThru;

Remove-Item $wtsVsix

# visualstudio2017community
# visualstudio2017professional
# visualstudio2017enterprise

choco install visualstudio2017community -y --package-parameters "--add Microsoft.VisualStudio.Component.Git"
RefreshEnv #refreshing env due to Git install

#--- UWP Workload and installing Windows Template Studio ---
choco install -y visualstudio2017-workload-azure
choco install -y visualstudio2017-workload-universal
executeScript "WindowsTemplateStudio.ps1";
executeScript "GetUwpSamplesOffGithub.ps1";

#--- reenabling critial items ---
Enable-UAC
Expand Down
52 changes: 18 additions & 34 deletions dev_ml_python.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,27 @@

Disable-UAC

#--- Windows Features ---
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions

#--- File Explorer Settings ---
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2

#--- Git ---
choco install -y git -params '"/GitAndUnixToolsOnPath /WindowsTerminal"'

#--- Windows Subsystems/Features ---
choco install -y Microsoft-Hyper-V-All -source windowsFeatures
choco install -y Microsoft-Windows-Subsystem-Linux -source windowsfeatures

#--- Ubuntu ---
# Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Ubuntu.appx -UseBasicParsing
# Add-AppxPackage -Path ~/Ubuntu.appx

#--- Fonts ---
choco install -y inconsolata
# choco install -y ubuntu.font

#--- Tools ---
choco install -y docker-for-windows
choco install -y python
choco install -y 7zip.install
# see if we can't get calling URL somehow, that would eliminate this need
# should move to a config file
$user = "Microsoft";
$baseBranch = "BreakUpScripts";
$finalBaseHelperUri = "https://raw.githubusercontent.com/$user/windows-dev-box-setup-scripts/$baseBranch/scripts";

function executeScript {
Param ([string]$script)
write-host "executing $finalBaseHelperUri/$script ..."
iex ((new-object net.webclient).DownloadString("$finalBaseHelperUri/$script"))
}

#--- Setting up Windows ---
executeScript "SystemConfiguration.ps1";
executeScript "FileExplorerSettings.ps1";
executeScript "RemoveDefaultApps.ps1";
executeScript "CommonDevTools.ps1";
executeScript "VirtualizationTools.ps1";

# TODO: install additional ML tools

#--- VS Code ---
choco install -y vscode

#--- VS Code extensions ---
choco install -y vscode-docker

Enable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
64 changes: 19 additions & 45 deletions dev_web.ps1
Original file line number Diff line number Diff line change
@@ -1,65 +1,39 @@
# Description: Boxstarter Script
# Author: Microsoft
# Common dev settings for web dev
# Common settings for web dev

Disable-UAC

#--- Windows Features ---
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions

#--- File Explorer Settings ---
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2
function executeScript {
Param ([string]$script)
write-host "executing $finalBaseHelperUri/$script ..."
iex ((new-object net.webclient).DownloadString("$finalBaseHelperUri/$script"))
}

# see if we can't get calling URL somehow, that would eliminate this need
# should move to a config file
$user = "Microsoft";
$baseBranch = "BreakUpScripts";
$finalBaseHelperUri = "https://raw.githubusercontent.com/$user/windows-dev-box-setup-scripts/$baseBranch/scripts";

#--- Setting up Windows ---
executeScript "FileExplorerSettings.ps1";
executeScript "SystemConfiguration.ps1";
executeScript "CommonDevTools.ps1";
executeScript "RemoveDefaultApps.ps1";
executeScript "VirtualizationTools.ps1";

#--- Tools ---
choco install -y vscode
code --install-extension msjsdiag.debugger-for-chrome
code --install-extension msjsdiag.debugger-for-edge

choco install -y git -params '"/GitAndUnixToolsOnPath /WindowsTerminal"'
choco install -y 7zip.install

#--- Windows Subsystems/Features ---
choco install -y Microsoft-Hyper-V-All -source windowsFeatures
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures

#--- Ubuntu ---
# Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Ubuntu.appx -UseBasicParsing
# Add-AppxPackage -Path ~/Ubuntu.appx

<#
#--- SLES ---
# Install SLES Store app
Invoke-WebRequest -Uri https://aka.ms/wsl-sles-12 -OutFile ~/SLES.appx -UseBasicParsing
Add-AppxPackage -Path ~/SLES.appx
# Launch SLES
sles-12.exe

# --- openSUSE ---
Invoke-WebRequest -Uri https://aka.ms/wsl-opensuse-42 -OutFile ~/openSUSE.appx -UseBasicParsing
Add-AppxPackage -Path ~/openSUSE.appx
# Launch openSUSE
opensuse-42.exe
#>

#--- Browsers ---
choco install -y googlechrome
choco install -y firefox

#--- Microsoft WebDriver ---
choco install -y microsoftwebdriver

#--- Fonts ---
choco install -y inconsolata
# choco install -y ubuntu.font

#--- Tools ---
choco install -y sysinternals
choco install -y docker-for-windows
choco install -y python

Enable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
52 changes: 22 additions & 30 deletions dev_web_nodejs.ps1
Original file line number Diff line number Diff line change
@@ -1,49 +1,41 @@
# Description: Boxstarter Script
# Author: Microsoft
# Common dev settings for web development
# Common settings for web development with NodeJS

Disable-UAC

#--- Windows Features ---
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions

#--- File Explorer Settings ---
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2

#--- Tools ---
choco install -y vscode
code --install-extension msjsdiag.debugger-for-chrome
code --install-extension msjsdiag.debugger-for-edge

choco install -y git -params '"/GitAndUnixToolsOnPath /WindowsTerminal"'
choco install -y 7zip.install

#--- Windows Subsystems/Features ---
choco install -y Microsoft-Hyper-V-All -source windowsFeatures
choco install -y Microsoft-Windows-Subsystem-Linux -source windowsfeatures

#--- Ubuntu ---
# Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Ubuntu.appx -UseBasicParsing
# Add-AppxPackage -Path ~/Ubuntu.appx
# see if we can't get calling URL somehow, that would eliminate this need
# should move to a config file
$user = "Microsoft";
$baseBranch = "BreakUpScripts";
$finalBaseHelperUri = "https://raw.githubusercontent.com/$user/windows-dev-box-setup-scripts/$baseBranch/scripts";

function executeScript {
Param ([string]$script)
write-host "executing $finalBaseHelperUri/$script ..."
iex ((new-object net.webclient).DownloadString("$finalBaseHelperUri/$script"))
}

#--- Setting up Windows ---
executeScript "SystemConfiguration.ps1";
executeScript "FileExplorerSettings.ps1";
executeScript "RemoveDefaultApps.ps1";
executeScript "CommonDevTools.ps1";
executeScript "VirtualizationTools.ps1";

#--- Browsers ---
choco install -y Firefox
choco install -y Googlechrome

#--- Fonts ---
choco install -y inconsolata
# choco install -y ubuntu.font
#--- Tools ---
code --install-extension msjsdiag.debugger-for-chrome
code --install-extension msjsdiag.debugger-for-edge

#--- Tools ---
choco install -y nodejs-lts # Node.js LTS, Recommended for most users
# choco install -y nodejs # Node.js Current, Latest features
choco install -y visualstudio2017buildtools
choco install -y visualstudio2017-workload-vctools
choco install -y sysinternals
choco install -y docker-for-windows
choco install -y python2 # Node.js requires Python 2 to build native modules

Enable-UAC
Expand Down
7 changes: 7 additions & 0 deletions scripts/CommonDevTools.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# tools we expect devs across many scenarios will want
choco install -y vscode
choco install -y git -params '"/GitAndUnixToolsOnPath /WindowsTerminal"'
choco install -y python
choco install -y 7zip.install
choco install -y sysinternals
15 changes: 15 additions & 0 deletions scripts/FileExplorerSettings.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#--- Configuring Windows properties ---
#--- Windows Features ---
# Show hidden files, Show protected OS files, Show file extensions
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions

#--- File Explorer Settings ---
# will expand explorer to the actual folder you're in
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneExpandToCurrentFolder -Value 1
#adds things back in your left pane like recycle bin
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name NavPaneShowAllFolders -Value 1
#opens PC to This PC, not quick access
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Value 1
#taskbar where window is open for multi-monitor
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarMode -Value 2

5 changes: 5 additions & 0 deletions scripts/GetUwpSamplesOffGithub.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
RefreshEnv
cd $env:USERPROFILE\desktop
mkdir UwpSamples
cd UwpSamples
git clone https://github.com/Microsoft/Windows-universal-samples/
Loading