Skip to content

Instantly share code, notes, and snippets.

@Luismcplopes
Last active July 19, 2019 13:49
Show Gist options
  • Save Luismcplopes/08014ee43d3b825afa8a976ce3231628 to your computer and use it in GitHub Desktop.
Save Luismcplopes/08014ee43d3b825afa8a976ce3231628 to your computer and use it in GitHub Desktop.
# Description: Boxstarter Script
# Author: Luislopes
# note backup feedreader DB
# Run using: START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/Luismcplopes/9607f171a3f95f4b81e901d1b2051bf4/raw/2979af4a33792223b524ee610d09cf5c07b2a4bd/teste.ps1
# http://boxstarter.org/package/url?https://gist.githubusercontent.com/Luismcplopes/9607f171a3f95f4b81e901d1b2051bf4/raw/2979af4a33792223b524ee610d09cf5c07b2a4bd/teste.ps1
# https://gist.github.com/Luismcplopes/9607f171a3f95f4b81e901d1b2051bf4
# Control Panel\Programs\Programs and Features
#--- PowerShell v2 ---
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1')); Get-Boxstarter -Force
#--- PowerShell v3+ ---
#Set-ExecutionPolicy Bypass -Scope Process -Force; iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
#. { iwr -useb https://boxstarter.org/bootstrapper.ps1 } | iex; Get-Boxstarter -Force
#--- Boxstarter options ---
#$Boxstarter.RebootOk=$true # Allow reboots?
#$Boxstarter.NoPassword=$false # Is this a machine with no login password?
#$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
#------------------- Basic setup -------------------
Update-ExecutionPolicy Unrestricted
Disable-UAC
Disable-GameBarTips
Disable-BingSearch
Disable-InternetExplorerESC
#------------------- Uninstall unecessary applications that come with Windows out of the box ---
# 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
Get-AppxPackage xbox | Remove-AppxPackage
# Zune Music, Movies & TV
Get-AppxPackage Microsoft.ZuneMusic | Remove-AppxPackage
Get-AppxPackage Microsoft.ZuneVideo | Remove-AppxPackage
#-------------------Windows Features -------------------
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
#--- Windows Taskbar Settings ---
#Set-TaskbarOptions -Size Small -Lock -Dock Top -Combine Always -AlwaysShowIconsOn
#------------------- Windows Subsystems/Features --- first view winver ---
cinst install Microsoft-Hyper-V-All -source windowsFeatures
cinst Microsoft-Hyper-V-All -source windowsFeatures
cinst install Microsoft-Windows-Subsystem-Linux -source windowsfeatures
#Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
#cinst IIS-WebServerRole -source windowsfeatures
#--- Ubuntu1804 --- --- first view winver ---
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu.appx -UseBasicParsing
Add-AppxPackage -Path ~/Ubuntu.appx
#--- Ubuntu1604
#Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Ubuntu.appx -UseBasicParsing
#Add-AppxPackage -Path ~/Ubuntu.appx
#-------- Download apllications in a Zipfile and descopress them --------
#$source = "http://www.feedreader.com/releases/FeedReader314Setup.zip"
#$destination = "$env:USERPROFILE\Desktop\FeedReader314Setup.zip"
#Write-Host Let me get the latest version for you. I am copying it in your temp folder:
#Write-Host $destination
#Invoke-WebRequest $source -OutFile "$destination"
# C:\ProgramData\chocolatey\tools\7z.exe
# if (-not (test-path "D:\APPs\7-Zip\7z.exe")) {throw "$env:ProgramFiles\7-Zip\7z.exe needed"}
# set-alias sz "$env:ProgramFiles\7-Zip\7z.exe"
#7za x -aoa -Y -o"$env:ProgramFiles\$packageName\" "$destination"
#--------------
Rename-Computer -NewName cbrtestwin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment