adding common scripts for use by multiple dev scenario scripts (#59)
This PR gets Master up to date with the common scripts approach. These are not done but this seems far enough along to proceed. We'll now move forward with refining these common scripts along with the dev scenario scripts that reference them.
This commit is contained in:
7
scripts/CommonDevTools.ps1
Normal file
7
scripts/CommonDevTools.ps1
Normal file
@@ -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
scripts/FileExplorerSettings.ps1
Normal file
15
scripts/FileExplorerSettings.ps1
Normal file
@@ -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
scripts/GetUwpSamplesOffGithub.ps1
Normal file
5
scripts/GetUwpSamplesOffGithub.ps1
Normal file
@@ -0,0 +1,5 @@
|
||||
RefreshEnv
|
||||
cd $env:USERPROFILE\desktop
|
||||
mkdir UwpSamples
|
||||
cd UwpSamples
|
||||
git clone https://github.com/Microsoft/Windows-universal-samples/
|
||||
67
scripts/RemoveDefaultApps.ps1
Normal file
67
scripts/RemoveDefaultApps.ps1
Normal file
@@ -0,0 +1,67 @@
|
||||
#--- Uninstall unecessary applications that come with Windows out of the box ---
|
||||
Write-Host "Uninstall unecessary applications that come with Windows out of the box" -ForegroundColor "Yellow"
|
||||
|
||||
#Referenced to build script
|
||||
# https://docs.microsoft.com/en-us/windows/application-management/remove-provisioned-apps-during-update
|
||||
# https://github.com/jayharris/dotfiles-windows/blob/master/windows.ps1#L157
|
||||
# https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
|
||||
# https://gist.github.com/alirobe/7f3b34ad89a159e6daa1
|
||||
# https://github.com/W4RH4WK/Debloat-Windows-10/blob/master/scripts/remove-default-apps.ps1
|
||||
|
||||
function removeApp {
|
||||
Param ([string]$appName)
|
||||
Write-Output "Trying to remove $appName"
|
||||
Get-AppxPackage $appName -AllUsers | Remove-AppxPackage
|
||||
Get-AppXProvisionedPackage -Online | Where DisplayNam -like $appName | Remove-AppxProvisionedPackage -Online
|
||||
}
|
||||
|
||||
$applicationList = @(
|
||||
"Microsoft.BingFinance"
|
||||
"Microsoft.3DBuilder"
|
||||
"Microsoft.BingFinance"
|
||||
"Microsoft.BingNews"
|
||||
"Microsoft.BingSports"
|
||||
"Microsoft.BingWeather"
|
||||
"Microsoft.CommsPhone"
|
||||
"Microsoft.Getstarted"
|
||||
"Microsoft.WindowsMaps"
|
||||
"*MarchofEmpires*"
|
||||
"Microsoft.GetHelp"
|
||||
"Microsoft.Messaging"
|
||||
"*Minecraft*"
|
||||
"Microsoft.MicrosoftOfficeHub"
|
||||
"Microsoft.OneConnect"
|
||||
"Microsoft.WindowsPhone"
|
||||
"Microsoft.SkypeApp"
|
||||
"Microsoft.WindowsSoundRecorder"
|
||||
"*Solitaire*"
|
||||
"Microsoft.MicrosoftStickyNotes"
|
||||
"Microsoft.Office.Sway"
|
||||
"Microsoft.XboxApp"
|
||||
"Microsoft.XboxIdentityProvider"
|
||||
"Microsoft.ZuneMusic"
|
||||
"Microsoft.ZuneVideo"
|
||||
"Microsoft.NetworkSpeedTest"
|
||||
"Microsoft.FreshPaint"
|
||||
"Microsoft.Print3D"
|
||||
|
||||
#Non-Microsoft
|
||||
"*Autodesk*"
|
||||
"*BubbleWitch*"
|
||||
"king.com.CandyCrush*"
|
||||
"*Dell*"
|
||||
"*Dropbox*"
|
||||
"*Facebook*"
|
||||
"*Keeper*"
|
||||
"*Netflix*"
|
||||
"*Twitter*"
|
||||
"*Plex*"
|
||||
"*.Duolingo-LearnLanguagesforFree"
|
||||
"*.EclipseManager"
|
||||
"ActiproSoftwareLLC.562882FEEB491" # Code Writer
|
||||
"*.AdobePhotoshopExpress"
|
||||
);
|
||||
|
||||
foreach ($app in $applicationList) {
|
||||
removeApp $app
|
||||
}
|
||||
4
scripts/SystemConfiguration.ps1
Normal file
4
scripts/SystemConfiguration.ps1
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
|
||||
#--- Enable developer mode on the system ---
|
||||
Set-ItemProperty -Path HKLM:\Software\Microsoft\Windows\CurrentVersion\AppModelUnlock -Name AllowDevelopmentWithoutDevLicense -Value 1
|
||||
29
scripts/VirtualizationTools.ps1
Normal file
29
scripts/VirtualizationTools.ps1
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
choco install -y Microsoft-Windows-Subsystem-Linux -source windowsfeatures
|
||||
choco install -y Microsoft-Hyper-V-All -source windowsFeatures
|
||||
Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Windows-Subsystem-Linux
|
||||
Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName Microsoft-Hyper-V
|
||||
choco install -y docker-for-windows
|
||||
choco install -y vscode-docker
|
||||
|
||||
|
||||
#--- 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
|
||||
#>
|
||||
|
||||
# TODO: add tool installation inside Ubuntu
|
||||
26
scripts/WindowsTemplateStudio.ps1
Normal file
26
scripts/WindowsTemplateStudio.ps1
Normal file
@@ -0,0 +1,26 @@
|
||||
# installing Windows Template Studio VSIX
|
||||
Write-Host "Installing Windows Template Studio" -ForegroundColor "Yellow"
|
||||
|
||||
$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 $env:USERPROFILE).path, $wtsVsix);
|
||||
|
||||
Invoke-WebRequest -Uri $wtsFileUrl.source -OutFile $wtsFullPath;
|
||||
|
||||
$vsixInstallerFile = Get-Childitem -Include vsixinstaller.exe -Recurse -Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\";
|
||||
$wtsArgList = "/quiet `"$wtsFullPath`"";
|
||||
|
||||
$vsixInstallerResult = Start-Process -FilePath $vsixInstallerFile.FullName -ArgumentList $wtsArgList -Wait -PassThru;
|
||||
|
||||
Remove-Item $wtsFullPath
|
||||
Reference in New Issue
Block a user