Last active
November 5, 2021 10:20
-
-
Save ZinkNotTheMetal/5f4dc93b316138ea6da81fe5fdd437e6 to your computer and use it in GitHub Desktop.
MidAmericaMortgage-BoxStarter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Invoke using following syntax into IE: | |
# http://boxstarter.org/package/url?https://gist.githubusercontent.com/ZinkNotTheMetal/5f4dc93b316138ea6da81fe5fdd437e6/raw/3b4a9c48bea2e8e62f270e39ff1fc81558d6bb20/mam-boxstarter.ps1 | |
try { | |
# Boxstarter options | |
$Boxstarter.RebootOk =$true | |
$Boxstarter.NoPassword =$false # Is this a machine with no logon password? | |
$Boxstarter.AutoLogin =$true | |
# --- TEMPORARILY DISABLE --- # | |
Disable-UAC | |
# --------------------------- # | |
# Set Windows configuration variables | |
# https://boxstarter.org/WinConfig | |
Set-WindowsExplorerOptions -enableshowFileExtensions -enableshowProtectedOSFiles | |
Disable-BingSearch | |
Update-ExecutionPolicy Unrestricted | |
cinst TelnetClient -source windowsFeatures | |
Write-BoxstarterMessage "Turning off Windows Hibernation" | |
powercfg -h off | |
# Install Software | |
# Vivaldi - Browser | |
#cinst vivaldi | |
# Pin - updates itself / chocolatey should not manage updates | |
#choco pin add -n=vivaldi | |
# Visual Studio 2019 - Community | |
cinst visualstudio2019community --limitoutput | |
# Pin - updates itself / chocolatey should not manage updates | |
choco pin add -n=visualstudio2019community | |
# SQL Server 2019 | |
cinst sql-server-2019 | |
# Pin - updates itself / chocolatey should not manage updates | |
choco pin add -n=sql-server-2019 | |
# SSMS for SQL Server | |
cinst sql-server-management-studio | |
# NuGet Package Explorer | |
cinst nugetpackageexplorer --limitoutput | |
# DotNet Core SDK | |
cinst dotnet-5.0-sdk | |
# .NET 4.8 | |
choco install dotnetfx | |
# Visual Studio Code | |
cinst visualstudiocode | |
# Pin - updates itself / chocolatey should not manage updates | |
choco pin add -n=visualstudiocode | |
# NCrunch | |
cinst ncrunch-vs2019 | |
# Terraform | |
cinst terraform | |
# Azure CLI | |
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi | |
# Microsoft Teams for communication | |
cinst microsoft-teams.install | |
# Install Git w/ Configuration | |
cinst git.install -params '"/GitAndUnixToolsOnPath"' --limitoutput | |
# Install Visual Studio Extensions | |
# Add New File | |
#Install-ChocolateyVsixPackage -PackageName "AddNewFile" -VsixUrl https://www.vsixgallery.com/extension/2E78AA18-E864-4FBB-B8C8-6186FC865DB3 | |
# Any additional extensions here | |
# Remove Windows 10 Metro Apps | |
Write-Output "Removing Windows 10 Metro apps..." | |
Get-AppxPackage Microsoft.549981C3F5F10 | Remove-AppxPackage # Cortana | |
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Microsoft3DViewer | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Print3D | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsAlarms | Remove-AppxPackage | |
Get-AppxPackage *Autodesk* | Remove-AppxPackage | |
Get-AppxPackage *Twitter* | Remove-AppxPackage | |
Get-AppxPackage *Dropbox* | Remove-AppxPackage | |
Get-AppxPackage *Netflix* | Remove-AppxPackage | |
Get-AppxPackage *Solitaire* | Remove-AppxPackage | |
Get-AppxPackage *Xbox* | Remove-AppxPackage | |
Get-AppxPackage *Keeper* | Remove-AppxPackage | |
Get-AppxPackage *Plex* | Remove-AppxPackage | |
Get-AppxPackage king.com.CandyCrushSaga | Remove-AppxPackage | |
Get-AppxPackage king.com.BubbleWitch3Saga | Remove-AppxPackage | |
Get-AppxPackage *McAfee* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingNews | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingSports | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Wallet | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsCamera | Remove-AppxPackage | |
Get-AppxPackage Microsoft.CommsPhone | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Getstarted | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsMaps | Remove-AppxPackage | |
Get-AppxPackage Microsoft.ScreenSketch | Remove-AppxPackage | |
Get-AppxPackage Microsoft.XboxApp | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsPhone | Remove-AppxPackage | |
Get-AppxPackage Microsoft.YourPhone | Remove-AppxPackage | |
Get-AppxPackage Microsoft.MicrosoftOfficeHub | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Office.Sway | Remove-AppxPackage | |
Get-AppxPackage Microsoft.People | Remove-AppxPackage | |
Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage | |
Get-AppxPackage Microsoft.ZuneVideo | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Office.OneNote | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Windows.Photos | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsSoundRecorder | Remove-AppxPackage | |
Get-AppxPackage Microsoft.MicrosoftStickyNotes | Remove-AppxPackage | |
Get-AppxPackage microsoft.windowscommunicationsapps | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Messaging | Remove-AppxPackage | |
Get-AppxPackage Microsoft.MixedReality.Portal | Remove-AppxPackage | |
Get-AppxPackage Microsoft.SkypeApp | Remove-AppxPackage | |
Get-AppxPackage *GAMELOFTSA.Asphalt8Airborne* | Remove-AppxPackage | |
Get-AppxPackage *king.com.CandyCrushSodaSaga* | Remove-AppxPackage | |
Get-AppxPackage *OneConnect* | Remove-AppxPackage | |
Get-AppxPackage *MarchofEmpires* | Remove-AppxPackage | |
Get-AppxPackage *PandoraMediaInc* | Remove-AppxPackage | |
Get-AppxPackage *Houzz* | Remove-AppxPackage | |
Get-AppxPackage *Viber* | Remove-AppxPackage | |
# Prevent applications from re-installing | |
$cdm = @( | |
"ContentDeliveryAllowed" | |
"FeatureManagementEnabled" | |
"OemPreInstalledAppsEnabled" | |
"PreInstalledAppsEnabled" | |
"PreInstalledAppsEverEnabled" | |
"SilentInstalledAppsEnabled" | |
"SubscribedContent-314559Enabled" | |
"SubscribedContent-338387Enabled" | |
"SubscribedContent-338388Enabled" | |
"SubscribedContent-338389Enabled" | |
"SubscribedContent-338393Enabled" | |
"SubscribedContentEnabled" | |
"SystemPaneSuggestionsEnabled" | |
) | |
foreach ($key in $cdm) { | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager -Name $key -Type DWord -Value 0 | |
} | |
If (-Not (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent)) { | |
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent | Out-Null | |
} | |
Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent -Name DisableWindowsConsumerFeatures -Type DWord -Value 1 | |
Write-Output "Removed Windows 10 Metro apps." | |
# Start Code - for initialization | |
# need to launch vscode so user folders are created as we can install extensions | |
$process = Start-Process code -PassThru | |
Start-Sleep -s 10 | |
$process.Close() | |
# C# | |
code --install-extension ms-dotnettools.csharp | |
# PowerShell | |
code --install-extension ms-vscode.PowerShell | |
# Markdown lint (helps README.md - linting) | |
code --install-extension DavidAnson.vscode-markdownlint | |
# Terraform | |
code --install-extension mauve.terraform | |
# Auto open markdown files | |
code --install-extension hnw.vscode-auto-open-markdown-preview | |
# Highlight braces with color | |
code --install-extension naumovs.color-highlight | |
# Auto close tag | |
code --install-extension formulahendry.auto-close-tag | |
# Auto rename tag | |
code --install-extension formulahendry.auto-rename-tag | |
# Docker | |
code --install-extension PeterJausovec.vscode-docker | |
code --install-extension mrmlnc.vscode-duplicate | |
# Highlight matching tag | |
code --install-extension vincaslt.highlight-matching-tag | |
# IntelliJ keybindings | |
code --install-extension k--kato.intellij-idea-keybindings | |
# Visual Studio Code icons | |
code --install-extension vscode-icons-team.vscode-icons | |
# Azure Function support | |
code --install-extension ms-azuretools.vscode-azurefunctions | |
# Azure Storage support | |
code --install-extension ms-azuretools.vscode-azurestorage | |
# NuGet package manager | |
code --install-extension jmrog.vscode-nuget-package-manager | |
# Setup C:\Work | |
if (!(Test-Path -Path C:\Work )) { | |
mkdir C:\Work | |
cd C:\Work | |
# Clone projects | |
git clone https://mortgagemachine@dev.azure.com/mortgagemachine/Mortgage%20Machine/_git/MortgageApp | |
git clone https://mortgagemachine@dev.azure.com/mortgagemachine/Mortgage%20Machine/_git/MortgageApp.Database | |
git clone https://mortgagemachine@dev.azure.com/mortgagemachine/MortgageMachineServicing/_git/MM.Imaging.Intake | |
git clone https://mortgagemachine@dev.azure.com/mortgagemachine/MortgageMachineServicing/_git/MM.Imaging.Infrastructure | |
} | |
# enable IIS features | |
cinst IIS-WebServerRole -source windowsfeatures | |
cinst IIS-WebServer -source windowsfeatures | |
cinst IIS-CommonHttpFeatures -source windowsfeatures | |
cinst IIS-ApplicationDevelopment -source windowsfeatures | |
cinst IIS-Security -source windowsfeatures | |
cinst IIS-URLAuthorization -source windowsfeatures | |
cinst IIS-RequestFiltering -source windowsfeatures | |
cinst IIS-NetFxExtensibility -source windowsfeatures | |
cinst IIS-HealthAndDiagnostics -source windowsfeatures | |
cinst IIS-HttpLogging -source windowsfeatures | |
cinst IIS-LoggingLibraries -source windowsfeatures | |
cinst IIS-RequestMonitor -source windowsfeatures | |
cinst IIS-HttpTracing -source windowsfeatures | |
cinst IIS-IPSecurity -source windowsfeatures | |
cinst IIS-Performance -source windowsfeatures | |
cinst IIS-WebServerManagementTools -source windowsfeatures | |
cinst IIS-IIS6ManagementCompatibility -source windowsfeatures | |
cinst IIS-Metabase -source windowsfeatures | |
cinst IIS-ISAPIExtensions -source windowsfeatures | |
cinst IIS-ISAPIFilter -source windowsfeatures | |
cinst IIS-BasicAuthentication -source windowsfeatures | |
cinst IIS-WindowsAuthentication -source windowsfeatures | |
cinst IIS-CGI -source windowsfeatures | |
cinst IIS-ASPNET -source windowsfeatures | |
cinst IIS-ASP -source windowsfeatures | |
cinst IIS-HttpCompressionDynamic -source windowsfeatures | |
cinst IIS-ManagementScriptingTools -source windowsfeatures | |
cinst IIS-StaticContent -source windowsfeatures | |
cinst IIS-DefaultDocument -source windowsfeatures | |
cinst IIS-DirectoryBrowsing -source windowsfeatures | |
cinst IIS-WebDAV -source windowsfeatures | |
cinst IIS-ServerSideIncludes -source windowsfeatures | |
cinst IIS-CustomLogging -source windowsfeatures | |
cinst IIS-HttpCompressionStatic -source windowsfeatures | |
cinst IIS-ManagementConsole -source windowsfeatures | |
cinst IIS-ManagementService -source windowsfeatures | |
cinst IIS-WMICompatibility -source windowsfeatures | |
cinst IIS-LegacyScripts -source windowsfeatures | |
cinst IIS-LegacySnapIn -source windowsfeatures | |
cinst IIS-FTPServer -source windowsfeatures | |
cinst IIS-FTPSvc -source windowsfeatures | |
cinst IIS-FTPExtensibility -source windowsfeatures | |
cinst IIS-DigestAuthentication -source windowsfeatures | |
# Remove Desktop Shortcuts | |
Write-BoxstarterMessage "Removing desktop shortcuts" | |
Get-ChildItem -Path "C:\Users\*\Desktop\*" -Recurse -Include *.lnk | Remove-Item -Force | |
# Install Windows Updates | |
Write-BoxstarterMessage "Running Windows Update" | |
Install-WindowsUpdate -Full -AcceptEula | |
# --- UNDO TEMPORARY DISABLE --- # | |
Enable-UAC | |
# ------------------------------ # | |
Write-BoxstarterMessage "Machine is complete!" | |
Write-BoxstarterMessage "Configure:" | |
Write-BoxstarterMessage " 1. New Blank File Keymap" | |
Write-BoxstarterMessage " 2. Open PowerShell do az login" | |
} catch { | |
Write-ChocolateyFailure 'Boxstarter Error: ' $($_.Exception.Message) | |
throw | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment