Skip to content

Instantly share code, notes, and snippets.

@AarynSmith
Last active September 20, 2017 21:47
Show Gist options
  • Save AarynSmith/3af19057f230b116d68fe82bb7e7b1fe to your computer and use it in GitHub Desktop.
Save AarynSmith/3af19057f230b116d68fe82bb7e7b1fe to your computer and use it in GitHub Desktop.
Boxstarter Config
# Description: Boxstarter Bootstrap Script
# Author: Aaryn Smith
# "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/unixblackhole/3af19057f230b116d68fe82bb7e7b1fe/raw/!Boxstarter.ps1'))"
$Shortcuts = @(
@{Name = "!Common"; URL = "!WindowsSetup.ps1 "},
@{Name = "Application"; URL = "Application.ps1"},
@{Name = "Dev Environment"; URL = "DevEnvironment.ps1"},
@{Name = "Work Apps"; URL = "WorkApps.ps1"},
@{Name = "Game Apps"; URL = "GameSetup.ps1"},
@{Name = "Remove Garbage"; URL = "Remove-Garbage.ps1"}
)
$GIST = "https://gist.githubusercontent.com/unixblackhole/3af19057f230b116d68fe82bb7e7b1fe/raw/"
$Boxstarter = "http://boxstarter.org/package/nr/url?"
$ShortcutFolder = ([System.Environment]::GetFolderPath("Desktop") + "\BoxStarter Shortcuts")
Remove-Item -Path $ShortcutFolder -Recurse
if(!(Test-Path -Path $ShortcutFolder )){
Write-Host "Creating Shortcut Folder"
New-Item -ItemType directory -Path $ShortcutFolder > $null
}
$WshShell = New-Object -ComObject WScript.Shell
foreach ($sc in $Shortcuts){
$Path = ($ShortcutFolder + "\" + $sc.Name + ".lnk")
Write-Host("Creating Shortcut for " + $sc.Name + " : " + $Path)
$Shortcut = $WshShell.CreateShortcut($Path)
# $Shortcut | Get-Member -memberType Properties
$Shortcut.TargetPath = ($Boxstarter + $GIST + $sc.URL)
$Shortcut.Save()
# New-Item -ItemType SymbolicLink -Path $ShortcutFolder -Name ($sc.Name + ".lnk") -Value $sc.URL
}
# Description: Common Windows Setup Script
# Author: Aaryn Smith
# Parts of this script are inspired by (shamelessly stolen from) Jess Frazelle:
# https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# Run this boxstarter by calling the following from an ** ELEVATED ** command-prompt:
# start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
# -- Temporarly Disable UAC --
Disable-UAC
# -- Windows Settings --
Disable-BingSearch
Disable-GameBarTips
Set-WindowsExplorerOptions -EnableShowFileExtensions
Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -Lock
Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -AlwaysShowIconsOn
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 MMTaskbarMode -Value 2
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name MMTaskbarGlomLevel -Value 1
# Remove Taskband icons:
# Set File Explorer to the only pinned icon
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband -Name Favorites -Value ([byte[]](0x00,0x92,0x01,0x00,0x00,0x3a,0x00,0x1f,0x80,0xc8,0x27,0x34,0x1f,0x10,0x5c,0x10,0x42,0xaa,0x03,0x2e,0xe4,0x52,0x87,0xd6,0x68,0x26,0x00,0x01,0x00,0x26,0x00,0xef,0xbe,0x12,0x00,0x00,0x00,0xc7,0xb6,0x46,0xe8,0xb1,0x2d,0xd3,0x01,0xab,0x3f,0x24,0xec,0xb1,0x2d,0xd3,0x01,0xab,0x3f,0x24,0xec,0xb1,0x2d,0xd3,0x01,0x14,0x00,0x56,0x00,0x31,0x00,0x00,0x00,0x00,0x00,0x2e,0x4b,0x3a,0xbc,0x11,0x00,0x54,0x61,0x73,0x6b,0x42,0x61,0x72,0x00,0x40,0x00,0x09,0x00,0x04,0x00,0xef,0xbe,0x2e,0x4b,0x3a,0xbc,0x2e,0x4b,0x3a,0xbc,0x2e,0x00,0x00,0x00,0x66,0x55,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd4,0xb5,0x17,0x00,0x54,0x00,0x61,0x00,0x73,0x00,0x6b,0x00,0x42,0x00,0x61,0x00,0x72,0x00,0x00,0x00,0x16,0x00,0x00,0x01,0x32,0x00,0x97,0x01,0x00,0x00,0x72,0x4a,0x4c,0xa7,0x20,0x00,0x46,0x49,0x4c,0x45,0x45,0x58,0x7e,0x31,0x2e,0x4c,0x4e,0x4b,0x00,0x00,0x7c,0x00,0x09,0x00,0x04,0x00,0xef,0xbe,0x2e,0x4b,0x3a,0xbc,0x2e,0x4b,0x3a,0xbc,0x2e,0x00,0x00,0x00,0x5a,0x56,0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x00,0x00,0x00,0x00,0x00,0x33,0x98,0x1e,0x00,0x46,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x20,0x00,0x45,0x00,0x78,0x00,0x70,0x00,0x6c,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x72,0x00,0x2e,0x00,0x6c,0x00,0x6e,0x00,0x6b,0x00,0x00,0x00,0x40,0x00,0x73,0x00,0x68,0x00,0x65,0x00,0x6c,0x00,0x6c,0x00,0x33,0x00,0x32,0x00,0x2e,0x00,0x64,0x00,0x6c,0x00,0x6c,0x00,0x2c,0x00,0x2d,0x00,0x32,0x00,0x32,0x00,0x30,0x00,0x36,0x00,0x37,0x00,0x00,0x00,0x1c,0x00,0x42,0x00,0x00,0x00,0x1d,0x00,0xef,0xbe,0x02,0x00,0x4d,0x00,0x69,0x00,0x63,0x00,0x72,0x00,0x6f,0x00,0x73,0x00,0x6f,0x00,0x66,0x00,0x74,0x00,0x2e,0x00,0x57,0x00,0x69,0x00,0x6e,0x00,0x64,0x00,0x6f,0x00,0x77,0x00,0x73,0x00,0x2e,0x00,0x45,0x00,0x78,0x00,0x70,0x00,0x6c,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x72,0x00,0x00,0x00,0x1c,0x00,0x26,0x00,0x00,0x00,0x1e,0x00,0xef,0xbe,0x02,0x00,0x53,0x00,0x79,0x00,0x73,0x00,0x74,0x00,0x65,0x00,0x6d,0x00,0x50,0x00,0x69,0x00,0x6e,0x00,0x6e,0x00,0x65,0x00,0x64,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x00,0xf4,0x05,0x00,0x00,0x14,0x00,0x1f,0x80,0x9b,0xd4,0x34,0x42,0x45,0x02,0xf3,0x4d,0xb7,0x80,0x38,0x93,0x94,0x34,0x56,0xe1,0xde,0x05,0x00,0x00,0x58,0x05,0x41,0x50,0x50,0x53,0x46,0x05,0x08,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x35,0x02,0x00,0x00,0x31,0x53,0x50,0x53,0x55,0x28,0x4c,0x9f,0x79,0x9f,0x39,0x4b,0xa8,0xd0,0xe1,0xd4,0x2d,0xe1,0xd5,0xf3,0x5d,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x25,0x00,0x00,0x00,0x4d,0x00,0x69,0x00,0x63,0x00,0x72,0x00,0x6f,0x00,0x73,0x00,0x6f,0x00,0x66,0x00,0x74,0x00,0x2e,0x00,0x57,0x00,0x69,0x00,0x6e,0x00,0x64,0x00,0x6f,0x00,0x77,0x00,0x73,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x5f,0x00,0x38,0x00,0x77,0x00,0x65,0x00,0x6b,0x00,0x79,0x00,0x62,0x00,0x33,0x00,0x64,0x00,0x38,0x00,0x62,0x00,0x62,0x00,0x77,0x00,0x65,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x85,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x3a,0x00,0x00,0x00,0x4d,0x00,0x69,0x00,0x63,0x00,0x72,0x00,0x6f,0x00,0x73,0x00,0x6f,0x00,0x66,0x00,0x74,0x00,0x2e,0x00,0x57,0x00,0x69,0x00,0x6e,0x00,0x64,0x00,0x6f,0x00,0x77,0x00,0x73,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x5f,0x00,0x31,0x00,0x31,0x00,0x37,0x00,0x30,0x00,0x38,0x00,0x2e,0x00,0x31,0x00,0x30,0x00,0x30,0x00,0x31,0x00,0x2e,0x00,0x32,0x00,0x31,0x00,0x2e,0x00,0x30,0x00,0x5f,0x00,0x78,0x00,0x36,0x00,0x34,0x00,0x5f,0x00,0x5f,0x00,0x38,0x00,0x77,0x00,0x65,0x00,0x6b,0x00,0x79,0x00,0x62,0x00,0x33,0x00,0x64,0x00,0x38,0x00,0x62,0x00,0x62,0x00,0x77,0x00,0x65,0x00,0x00,0x00,0x65,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x29,0x00,0x00,0x00,0x4d,0x00,0x69,0x00,0x63,0x00,0x72,0x00,0x6f,0x00,0x73,0x00,0x6f,0x00,0x66,0x00,0x74,0x00,0x2e,0x00,0x57,0x00,0x69,0x00,0x6e,0x00,0x64,0x00,0x6f,0x00,0x77,0x00,0x73,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x5f,0x00,0x38,0x00,0x77,0x00,0x65,0x00,0x6b,0x00,0x79,0x00,0x62,0x00,0x33,0x00,0x64,0x00,0x38,0x00,0x62,0x00,0x62,0x00,0x77,0x00,0x65,0x00,0x21,0x00,0x41,0x00,0x70,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0xc1,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x57,0x00,0x00,0x00,0x43,0x00,0x3a,0x00,0x5c,0x00,0x50,0x00,0x72,0x00,0x6f,0x00,0x67,0x00,0x72,0x00,0x61,0x00,0x6d,0x00,0x20,0x00,0x46,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x73,0x00,0x5c,0x00,0x57,0x00,0x69,0x00,0x6e,0x00,0x64,0x00,0x6f,0x00,0x77,0x00,0x73,0x00,0x41,0x00,0x70,0x00,0x70,0x00,0x73,0x00,0x5c,0x00,0x4d,0x00,0x69,0x00,0x63,0x00,0x72,0x00,0x6f,0x00,0x73,0x00,0x6f,0x00,0x66,0x00,0x74,0x00,0x2e,0x00,0x57,0x00,0x69,0x00,0x6e,0x00,0x64,0x00,0x6f,0x00,0x77,0x00,0x73,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x5f,0x00,0x31,0x00,0x31,0x00,0x37,0x00,0x30,0x00,0x38,0x00,0x2e,0x00,0x31,0x00,0x30,0x00,0x30,0x00,0x31,0x00,0x2e,0x00,0x32,0x00,0x31,0x00,0x2e,0x00,0x30,0x00,0x5f,0x00,0x78,0x00,0x36,0x00,0x34,0x00,0x5f,0x00,0x5f,0x00,0x38,0x00,0x77,0x00,0x65,0x00,0x6b,0x00,0x79,0x00,0x62,0x00,0x33,0x00,0x64,0x00,0x38,0x00,0x62,0x00,0x62,0x00,0x77,0x00,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x00,0x00,0x00,0x31,0x53,0x50,0x53,0xb1,0x16,0x6d,0x44,0xad,0x8d,0x70,0x48,0xa7,0x48,0x40,0x2e,0xa4,0x3d,0x78,0x8c,0x15,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x1e,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x02,0x00,0x00,0x31,0x53,0x50,0x53,0x4d,0x0b,0xd4,0x86,0x69,0x90,0x3c,0x44,0x81,0x9a,0x2a,0x54,0x09,0x0d,0xcc,0xec,0x55,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x41,0x00,0x73,0x00,0x73,0x00,0x65,0x00,0x74,0x00,0x73,0x00,0x2f,0x00,0x41,0x00,0x70,0x00,0x70,0x00,0x54,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x73,0x00,0x2f,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x41,0x00,0x70,0x00,0x70,0x00,0x4c,0x00,0x69,0x00,0x73,0x00,0x74,0x00,0x2e,0x00,0x70,0x00,0x6e,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x41,0x00,0x73,0x00,0x73,0x00,0x65,0x00,0x74,0x00,0x73,0x00,0x2f,0x00,0x41,0x00,0x70,0x00,0x70,0x00,0x54,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x73,0x00,0x2f,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x4d,0x00,0x65,0x00,0x64,0x00,0x54,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x2e,0x00,0x70,0x00,0x6e,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x41,0x00,0x73,0x00,0x73,0x00,0x65,0x00,0x74,0x00,0x73,0x00,0x2f,0x00,0x41,0x00,0x70,0x00,0x70,0x00,0x54,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x73,0x00,0x2f,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x42,0x00,0x61,0x00,0x64,0x00,0x67,0x00,0x65,0x00,0x4c,0x00,0x6f,0x00,0x67,0x00,0x6f,0x00,0x2e,0x00,0x70,0x00,0x6e,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x55,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x41,0x00,0x73,0x00,0x73,0x00,0x65,0x00,0x74,0x00,0x73,0x00,0x2f,0x00,0x41,0x00,0x70,0x00,0x70,0x00,0x54,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x73,0x00,0x2f,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x57,0x00,0x69,0x00,0x64,0x00,0x65,0x00,0x54,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x2e,0x00,0x70,0x00,0x6e,0x00,0x67,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x00,0x78,0xd7,0xff,0x59,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x41,0x00,0x73,0x00,0x73,0x00,0x65,0x00,0x74,0x00,0x73,0x00,0x2f,0x00,0x41,0x00,0x70,0x00,0x70,0x00,0x54,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x73,0x00,0x2f,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x4c,0x00,0x61,0x00,0x72,0x00,0x67,0x00,0x65,0x00,0x54,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x2e,0x00,0x70,0x00,0x6e,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x11,0x00,0x00,0x00,0x0e,0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0xa9,0x00,0x00,0x00,0x1d,0x00,0x00,0x00,0x0b,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x00,0x00,0x59,0x00,0x00,0x00,0x14,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x41,0x00,0x73,0x00,0x73,0x00,0x65,0x00,0x74,0x00,0x73,0x00,0x2f,0x00,0x41,0x00,0x70,0x00,0x70,0x00,0x54,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x73,0x00,0x2f,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x53,0x00,0x6d,0x00,0x61,0x00,0x6c,0x00,0x6c,0x00,0x54,0x00,0x69,0x00,0x6c,0x00,0x65,0x00,0x2e,0x00,0x70,0x00,0x6e,0x00,0x67,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x31,0x53,0x50,0x53,0x30,0xf1,0x25,0xb7,0xef,0x47,0x1a,0x10,0xa5,0xf1,0x02,0x60,0x8c,0x9e,0xeb,0xac,0x1d,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x00,0x1f,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x53,0x00,0x74,0x00,0x6f,0x00,0x72,0x00,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2d,0x00,0x00,0x00,0x31,0x53,0x50,0x53,0xb3,0x77,0xed,0x0d,0x14,0xc6,0x6c,0x45,0xae,0x5b,0x28,0x5b,0x38,0xd7,0xb0,0x1b,0x11,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x22,0x00,0x00,0x00,0x1e,0x00,0xef,0xbe,0x02,0x00,0x55,0x00,0x73,0x00,0x65,0x00,0x72,0x00,0x50,0x00,0x69,0x00,0x6e,0x00,0x6e,0x00,0x65,0x00,0x64,0x00,0x00,0x00,0x5e,0x05,0x5e,0x00,0x00,0x00,0x1d,0x00,0xef,0xbe,0x02,0x00,0x00,0x5e,0x05,0x00,0x00,0xff))
# Remove search icon
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Search -Name SearchboxTaskbarMode -Value 0
# Disable easy access keyboard stuff
Set-ItemProperty -Path 'HKCU:\Control Panel\Accessibility\StickyKeys' -Name Flags -Value 506
Set-ItemProperty -Path 'HKCU:\Control Panel\Accessibility\Keyboard Response' -Name Flags -Value 122
Set-ItemProperty -Path 'HKCU:\Control Panel\Accessibility\ToggleKeys' -Name Flags -Value 58
# Addtional Settings from NickCraver:
# https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
# WiFi Sense: HotSpot Sharing: Disable
Set-ItemProperty -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting -Name value -Type DWord -Value 0
# WiFi Sense: Shared HotSpot Auto-Connect: Disable
Set-ItemProperty -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots -Name value -Type DWord -Value 0
# Start Menu: Disable Bing Search Results
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 0
# Disable Telemetry (requires a reboot to take effect)
Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection -Name AllowTelemetry -Type DWord -Value 0
Get-Service DiagTrack,Dmwappushservice | Stop-Service | Set-Service -StartupType Disabled
# Disable P2P Update downlods outside of local network
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config -Name DODownloadMode -Type DWord -Value 1
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization -Name SystemSettingsDownloadMode -Type DWord -Value 3
New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search'
#Don't Allow Cortana
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search' -Name AllowCortana -Value 0
#Don't Allow search and Cortana to use location
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search' -Name AllowSearchToUseLocation -Value 0
#Do not allow web search
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search' -Name DisableWebSearch -Value 1
#Don't search the web or display web results in Search
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search' -Name ConnectedSearchUseWeb -Value 0
#Set what information is shared in Search
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search' -Name ConnectedSearchPrivacy -Value 3
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent
New-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\CloudContent -Name DisableWindowsConsumerFeatures -Value 1 -Type DWORD
# -- Install WSL --
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures
# -- Restore Temporary Settings --
Enable-UAC
Enable-MicrosoftUpdate
Install-WindowsUpdate -acceptEula
# Description: Generic Application Setup Script
# Author: Aaryn Smith
# -- Tools --
choco install git.install -params "/gitandunixtoolsonpath /windowsterminal" -y
choco install kitty
choco install 7zip
# -- Apps --
choco install googlechrome
choco install firefox
choco install irfanview -y
choco install irfanviewplugins -y
choco install launchy
choco install winscp.install
choco install qbittorrent
choco install zerotier-one
choco install everything
choco install sumatrapdf.install
#choco install conemu
choco install imgburn
choco install veeam-endpoint-backup-free
choco install vlc
choco install procexp
choco install imdisk
#Logitech Software
#choco install unifying
#choco install logitech-options
# Description: Dev Environment Setup Script
# Author: Aaryn Smith
# -- Install Fonts --
choco install firacode -y
# -- Development/VSCode --
choco install golang
choco install anaconda3
choco install visualstudiocode
refreshenv
code --install-extension lukehoban.Go
code --install-extension bungcip.better-toml
code --install-extension donjayamanne.githistory
code --install-extension mohsen1.prettify-json
code --install-extension ms-vscode.PowerShell
code --install-extension robertohuertasm.vscode-icons
code --install-extension waderyan.gitblame
code --install-extension kenhowardpdx.vscode-gist
Write-Output @"
// Place your settings in this file to overwrite the default settings
{
"editor.detectIndentation": true,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.fontSize": 14,
"editor.insertSpaces": false,
"editor.minimap.enabled": true,
"editor.renderWhitespace": "boundary",
"files.autoSave": "off",
"terminal.integrated.fontFamily": "Fira Code",
"terminal.integrated.fontLigatures": true,
"terminal.integrated.fontSize": 14,
"git.confirmSync": false,
"window.zoomLevel": -1,
"workbench.commandPalette.preserveInput": true,
"workbench.editor.closeOnFileDelete": false,
"workbench.iconTheme": "vscode-icons"
}
"@ | Out-File $Env:APPDATA"\Code\User\Settings.json" -Encoding ASCII
choco install steam
choco install discord
choco install twitch
# Description: Uninstall Script
# Author: Aaryn Smith
# Parts of this script are inspired by (shamelessly stolen from) W4RH4WK:
# https://github.com/W4RH4WK/Debloat-Windows-10
function force-mkdir($path) {
if (!(Test-Path $path)) {
#Write-Host "-- Creating full path to: " $path -ForegroundColor White -BackgroundColor DarkGreen
New-Item -ItemType Directory -Force -Path $path
}
}
function Takeown-File($path) {
takeown.exe /A /F $path
$acl = Get-Acl $path
# get administraor group
$admins = New-Object System.Security.Principal.SecurityIdentifier("S-1-5-32-544")
$admins = $admins.Translate([System.Security.Principal.NTAccount])
# add NT Authority\SYSTEM
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($admins, "FullControl", "None", "None", "Allow")
$acl.AddAccessRule($rule)
Set-Acl -Path $path -AclObject $acl
}
function Takeown-Folder($path) {
Takeown-File $path
foreach ($item in Get-ChildItem $path) {
if (Test-Path $item -PathType Container) {
Takeown-Folder $item.FullName
} else {
Takeown-File $item.FullName
}
}
}
Get-AppxPackage | where-object {$_.name -notlike "*store*"} | Remove-AppxPackage
# Remove Onedrive
taskkill.exe /F /IM "OneDrive.exe"
taskkill.exe /F /IM "explorer.exe"
if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") {
& "$env:systemroot\System32\OneDriveSetup.exe" /uninstall
}
if (Test-Path "$env:systemroot\SysWOW64\OneDriveSetup.exe") {
& "$env:systemroot\SysWOW64\OneDriveSetup.exe" /uninstall
}
rm -Recurse -Force -ErrorAction SilentlyContinue "$env:localappdata\Microsoft\OneDrive"
rm -Recurse -Force -ErrorAction SilentlyContinue "$env:programdata\Microsoft OneDrive"
rm -Recurse -Force -ErrorAction SilentlyContinue "C:\OneDriveTemp"
New-PSDrive -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" -Name "HKCR"
mkdir -Force "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
sp "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0
mkdir -Force "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
sp "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0
Remove-PSDrive "HKCR"
reg load "hku\Default" "C:\Users\Default\NTUSER.DAT"
reg delete "HKEY_USERS\Default\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v "OneDriveSetup" /f
reg unload "hku\Default"
rm -Force -ErrorAction SilentlyContinue "$env:userprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\OneDrive.lnk"
Get-ScheduledTask -TaskPath '\' -TaskName 'OneDrive*' -ea SilentlyContinue | Unregister-ScheduledTask -Confirm:$false
start "explorer.exe"
sleep 10
foreach ($item in (ls "$env:WinDir\WinSxS\*onedrive*")) {
Takeown-Folder $item.FullName
rm -Recurse -Force $item.FullName
}
choco install sql-server-management-studio
choco install pgadmin3
choco install wireshark
choco install jre8
choco install veracrypt
choco install nmap
choco install filezilla.server
choco install sysinternals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment