Skip to content

Instantly share code, notes, and snippets.

@verglor
Last active February 16, 2020 01:13
Show Gist options
  • Select an option

  • Save verglor/8881cba98f51a7e689e9bf49ee04129c to your computer and use it in GitHub Desktop.

Select an option

Save verglor/8881cba98f51a7e689e9bf49ee04129c to your computer and use it in GitHub Desktop.

Revisions

  1. verglor revised this gist Feb 16, 2020. 1 changed file with 5 additions and 9 deletions.
    14 changes: 5 additions & 9 deletions boxstarter-generic.ps1
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Description: Boxstarter Script
    # Author: verglor@verglor.com
    # Last Updated: 2018-11-26
    # Last Updated: 2020-02-16
    #
    # Install boxstarter:
    # . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
    @@ -45,11 +45,9 @@ cinst -y 7-taskbar-tweaker
    cinst -y cmdermini
    cmd /c mklink /D C:\tools\cmdermini\vendor\git-for-windows "$Env:ProgramFiles\Git"


    # Disable unsecure SMBv1 protocol
    Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol


    # Privacy: Let apps use my advertising ID: Disable
    If (-Not (Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo")) {
    New-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo | Out-Null
    @@ -72,8 +70,8 @@ Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -N

    # Disable Telemetry (requires a reboot to take effect)
    # Note this may break Insider builds for your organization
    # 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
    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

    # Change Explorer home screen back to "This PC"
    Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Type DWord -Value 1
    @@ -107,7 +105,7 @@ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\P
    # To Restore:
    # Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power' -Name AwayModeEnabled -Type DWord -Value 0

    # Use the Windows 7-8.1 Style Volume Mixer
    # Use the Windows 7 Style Volume Mixer
    #If (-Not (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC")) {
    # New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name MTCUVC | Out-Null
    #}
    @@ -269,13 +267,11 @@ Get-AppxPackage *HiddenCityMysteryofShadows* | Remove-AppxPackage

    # Windows Update
    Enable-MicrosoftUpdate
    #Install-WindowsUpdate -AcceptEula

    Install-WindowsUpdate -AcceptEula

    ###############################
    # Cleanup
    ###############################

    # Restore UAC
    Enable-UAC

  2. verglor revised this gist Nov 26, 2018. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions boxstarter-generic.ps1
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Description: Boxstarter Script
    # Author: verglor@verglor.com
    # Last Updated: 2018-10-24
    # Last Updated: 2018-11-26
    #
    # Install boxstarter:
    # . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
    @@ -108,10 +108,10 @@ Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\P
    # Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power' -Name AwayModeEnabled -Type DWord -Value 0

    # Use the Windows 7-8.1 Style Volume Mixer
    If (-Not (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name MTCUVC | Out-Null
    }
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC" -Name EnableMtcUvc -Type DWord -Value 0
    #If (-Not (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC")) {
    # New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name MTCUVC | Out-Null
    #}
    #Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC" -Name EnableMtcUvc -Type DWord -Value 0
    # To Restore (Windows 10 Style Volume Control):
    # Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC" -Name EnableMtcUvc -Type DWord -Value 1

  3. verglor renamed this gist Oct 25, 2018. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. verglor revised this gist Oct 25, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions boxstarter-minimal.ps1
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,3 @@
    . { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
    Import-Module Boxstarter.Chocolatey
    Install-BoxstarterPackage -PackageName https://git.io/fxXuv -DisableReboots
  5. verglor revised this gist Oct 25, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion boxstarter-minimal.ps1
    Original file line number Diff line number Diff line change
    @@ -1,2 +1,2 @@
    . { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
    cinst -y far
    Install-BoxstarterPackage -PackageName https://git.io/fxXuv -DisableReboots
  6. verglor revised this gist Oct 25, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions boxstarter-minimal.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    . { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
    cinst -y far
  7. verglor revised this gist Oct 24, 2018. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions boxstarter-generic.ps1
    Original file line number Diff line number Diff line change
    @@ -37,12 +37,13 @@ Disable-InternetExplorerESC

    cinst -y chocolateygui chocolatey-core.extension chocolatey-windowsupdate.extension

    cinst -y far
    cinst -y processhacker
    cinst -y sysinternals
    cinst -y 7-taskbar-tweaker






    cinst -y cmdermini
    cmd /c mklink /D C:\tools\cmdermini\vendor\git-for-windows "$Env:ProgramFiles\Git"


    # Disable unsecure SMBv1 protocol
  8. verglor revised this gist Oct 24, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion boxstarter-generic.ps1
    Original file line number Diff line number Diff line change
    @@ -268,7 +268,7 @@ Get-AppxPackage *HiddenCityMysteryofShadows* | Remove-AppxPackage

    # Windows Update
    Enable-MicrosoftUpdate
    Install-WindowsUpdate -AcceptEula
    #Install-WindowsUpdate -AcceptEula


    ###############################
  9. verglor revised this gist Oct 24, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions boxstarter-generic.ps1
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,9 @@
    # You might need to set: Set-ExecutionPolicy RemoteSigned
    #
    # Run this boxstarter by calling the following from an **elevated** command-prompt:
    # start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
    # start http://boxstarter.org/package/nr/url?https://git.io/fxXuv
    # OR
    # Install-BoxstarterPackage -PackageName <URL-TO-RAW-GIST> -DisableReboots
    # Install-BoxstarterPackage -PackageName https://git.io/fxXuv -DisableReboots
    #
    # Learn more: http://boxstarter.org/Learn/WebLauncher
    #
  10. verglor created this gist Oct 23, 2018.
    280 changes: 280 additions & 0 deletions boxstarter-generic.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,280 @@
    # Description: Boxstarter Script
    # Author: verglor@verglor.com
    # Last Updated: 2018-10-24
    #
    # Install boxstarter:
    # . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
    #
    # You might need to set: Set-ExecutionPolicy RemoteSigned
    #
    # Run this boxstarter by calling the following from an **elevated** command-prompt:
    # start http://boxstarter.org/package/nr/url?<URL-TO-RAW-GIST>
    # OR
    # Install-BoxstarterPackage -PackageName <URL-TO-RAW-GIST> -DisableReboots
    #
    # Learn more: http://boxstarter.org/Learn/WebLauncher
    #
    # Credits:
    # - https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
    #

    ###############################
    # Settings
    ###############################

    # Temporarily disable UAC during this script
    Disable-UAC

    Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
    #Set-StartScreenOptions -EnableBootToDesktop

    Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -Lock
    Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -AlwaysShowIconsOn

    Enable-RemoteDesktop

    Disable-InternetExplorerESC

    cinst -y chocolateygui chocolatey-core.extension chocolatey-windowsupdate.extension









    # Disable unsecure SMBv1 protocol
    Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol


    # Privacy: Let apps use my advertising ID: Disable
    If (-Not (Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo")) {
    New-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo | Out-Null
    }
    Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0

    # WiFi Sense: HotSpot Sharing: Disable
    If (-Not (Test-Path "HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting")) {
    New-Item -Path HKLM:\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting | Out-Null
    }
    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
    # To Restore (Enabled):
    # Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 1

    # Disable Telemetry (requires a reboot to take effect)
    # Note this may break Insider builds for your organization
    # 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

    # Change Explorer home screen back to "This PC"
    Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Type DWord -Value 1
    # Change it back to "Quick Access" (Windows 10 default)
    # Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name LaunchTo -Type DWord -Value 2

    # Better File Explorer
    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 MMTaskbarMode -Value 2

    # These make "Quick Access" behave much closer to the old "Favorites"
    # Disable Quick Access: Recent Files
    Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowRecent -Type DWord -Value 0
    # Disable Quick Access: Frequent Folders
    Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowFrequent -Type DWord -Value 0
    # To Restore:
    # Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowRecent -Type DWord -Value 1
    # Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name ShowFrequent -Type DWord -Value 1

    # Disable the Lock Screen (the one before password prompt - to prevent dropping the first character)
    If (-Not (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization)) {
    New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name Personalization | Out-Null
    }
    Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -Type DWord -Value 1
    # To Restore:
    # Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -Type DWord -Value 1

    # Lock screen (not sleep) on lid close
    Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power' -Name AwayModeEnabled -Type DWord -Value 1
    # To Restore:
    # Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power' -Name AwayModeEnabled -Type DWord -Value 0

    # Use the Windows 7-8.1 Style Volume Mixer
    If (-Not (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC")) {
    New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name MTCUVC | Out-Null
    }
    Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC" -Name EnableMtcUvc -Type DWord -Value 0
    # To Restore (Windows 10 Style Volume Control):
    # Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\MTCUVC" -Name EnableMtcUvc -Type DWord -Value 1

    # Disable Xbox Gamebar
    Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\GameDVR" -Name AppCaptureEnabled -Type DWord -Value 0
    Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name GameDVR_Enabled -Type DWord -Value 0

    # Turn off People in Taskbar
    If (-Not (Test-Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People")) {
    New-Item -Path HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People | Out-Null
    }
    Set-ItemProperty -Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name PeopleBand -Type DWord -Value 0

    # Prevent automatic reboots for Windows Update while a user is logged in
    If (-Not (Test-Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{8FA01A01-4B9C-4A5F-9E4B-5242B1CA676A}Machine\Software\Policies\Microsoft\Windows\WindowsUpdate\AU")) {
    New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{8FA01A01-4B9C-4A5F-9E4B-5242B1CA676A}Machine\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" | Out-Null
    }
    Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{8FA01A01-4B9C-4A5F-9E4B-5242B1CA676A}Machine\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name NoAutoRebootWithLoggedOnUsers -Type DWord -Value 1 -Force

    ###############################
    # Uninstall bloatware
    ###############################

    Disable-BingSearch
    Disable-GameBarTips

    # 3D Builder
    Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage

    # Alarms
    Get-AppxPackage Microsoft.WindowsAlarms | Remove-AppxPackage

    # Autodesk
    Get-AppxPackage *Autodesk* | Remove-AppxPackage

    # Bing Weather, News, Sports, and Finance (Money):
    Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage
    Get-AppxPackage Microsoft.BingNews | Remove-AppxPackage
    Get-AppxPackage Microsoft.BingSports | Remove-AppxPackage
    Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage

    # BubbleWitch
    Get-AppxPackage *BubbleWitch* | Remove-AppxPackage

    # Candy Crush
    Get-AppxPackage king.com.CandyCrush* | Remove-AppxPackage

    # Comms Phone
    Get-AppxPackage Microsoft.CommsPhone | Remove-AppxPackage

    # Dell
    Get-AppxPackage *Dell* | Remove-AppxPackage

    # Dropbox
    Get-AppxPackage *Dropbox* | Remove-AppxPackage

    # Facebook
    Get-AppxPackage *Facebook* | Remove-AppxPackage

    # Feedback Hub
    Get-AppxPackage Microsoft.WindowsFeedbackHub | Remove-AppxPackage

    # Get Started
    Get-AppxPackage Microsoft.Getstarted | Remove-AppxPackage

    # Keeper
    Get-AppxPackage *Keeper* | Remove-AppxPackage

    # Mail & Calendar
    Get-AppxPackage microsoft.windowscommunicationsapps | Remove-AppxPackage

    # Maps
    Get-AppxPackage Microsoft.WindowsMaps | Remove-AppxPackage

    # March of Empires
    Get-AppxPackage *MarchofEmpires* | Remove-AppxPackage

    # McAfee Security
    Get-AppxPackage *McAfee* | Remove-AppxPackage

    # Uninstall McAfee Security App
    $mcafee = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match "McAfee Security" } | select UninstallString
    if ($mcafee) {
    $mcafee = $mcafee.UninstallString -Replace "C:\Program Files\McAfee\MSC\mcuihost.exe",""
    Write "Uninstalling McAfee..."
    start-process "C:\Program Files\McAfee\MSC\mcuihost.exe" -arg "$mcafee" -Wait
    }

    # Messaging
    Get-AppxPackage Microsoft.Messaging | Remove-AppxPackage

    # Minecraft
    Get-AppxPackage *Minecraft* | Remove-AppxPackage

    # Netflix
    Get-AppxPackage *Netflix* | Remove-AppxPackage

    # Office Hub
    Get-AppxPackage Microsoft.MicrosoftOfficeHub | Remove-AppxPackage

    # One Connect
    Get-AppxPackage Microsoft.OneConnect | Remove-AppxPackage

    # OneNote
    Get-AppxPackage Microsoft.Office.OneNote | Remove-AppxPackage

    # People
    Get-AppxPackage Microsoft.People | Remove-AppxPackage

    # Phone
    Get-AppxPackage Microsoft.WindowsPhone | Remove-AppxPackage

    # Photos
    Get-AppxPackage Microsoft.Windows.Photos | Remove-AppxPackage

    # Plex
    Get-AppxPackage *Plex* | Remove-AppxPackage

    # Skype (Metro version)
    Get-AppxPackage Microsoft.SkypeApp | Remove-AppxPackage

    # Sound Recorder
    Get-AppxPackage Microsoft.WindowsSoundRecorder | Remove-AppxPackage

    # Solitaire
    Get-AppxPackage *Solitaire* | Remove-AppxPackage

    # Sticky Notes
    Get-AppxPackage Microsoft.MicrosoftStickyNotes | Remove-AppxPackage

    # Sway
    Get-AppxPackage Microsoft.Office.Sway | Remove-AppxPackage

    # Twitter
    Get-AppxPackage *Twitter* | Remove-AppxPackage

    # Xbox
    Get-AppxPackage Microsoft.XboxApp | Remove-AppxPackage
    Get-AppxPackage Microsoft.XboxIdentityProvider | Remove-AppxPackage

    # Zune Music, Movies & TV
    #Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage
    #Get-AppxPackage Microsoft.ZuneVideo | Remove-AppxPackage

    # Disney Magic Kingdom
    Get-AppxPackage *DisneyMagicKingdom* | Remove-AppxPackage

    # Hidden City: Hidden Object Adventure
    Get-AppxPackage *HiddenCityMysteryofShadows* | Remove-AppxPackage


    ###############################
    # Install
    ###############################

    # Windows Update
    Enable-MicrosoftUpdate
    Install-WindowsUpdate -AcceptEula


    ###############################
    # Cleanup
    ###############################

    # Restore UAC
    Enable-UAC