Skip to content

Instantly share code, notes, and snippets.

@vmsilvamolina
Last active April 18, 2020 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmsilvamolina/e941b751f0d034400b885e369b4e0f77 to your computer and use it in GitHub Desktop.
Save vmsilvamolina/e941b751f0d034400b885e369b4e0f77 to your computer and use it in GitHub Desktop.
WindowsAutoStart is a script to run when reinstall my personal Notebook.
### Script to use when reinstall Windows (personal) ###
##### Version history:
# 0.1 - 23/03/2017 - Add Chocolatey and basic software
# 0.2 - 17/10/2017 - Add new software
# 0.3 - 13/04/2018 - Remove visio and spotify
#####
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] “Administrator”)) {
Write-Host “You do not have Administrator rights to run this script!`nPlease re-run this script as an Administrator!”
Break
}
#Execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force
#Install Chocolatey
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
#Install Office 365 ProPlus
mkdir $env:temp\office
cd $env:temp\office
iwr https://download.microsoft.com/download/2/7/A/27AF1BE6-DD20-4CB4-B154-EBAB8A7D4A7E/officedeploymenttool_12624-20320.exe -OutFile .\officedeploymenttool_12624-20320.exe
$configFile = "$env:temp\office\configuration.xml"
@"
<Configuration>
<Add OfficeClientEdition="64" Channel="Current">
<Product ID="O365ProPlusRetail">
<Language ID="en-us" />
</Product>
</Add>
</Configuration>
"@ > $configFile
.\officedeploymenttool_12624-20320.exe /extract:. /q
.\setup.exe /configure .\configuration.xml
#Install software from Chocolatey
choco install powershell -y
choco install firefox -y
choco install visualstudiocode -y
choco install vscode-powershell -y
choco install docker -y
choco install 7zip -y
choco install slack -y
choco install vlc -y
choco install calibre -y
#choco install wunderlist -y
#choco install spotify -y #Genera error
#choco install inkscape -y
#install git y revisar error de Chrome
#Remove all desktop shortcuts
Remove-Item C:\Users\*\Desktop\*lnk –Force
#Uninstall apps
Get-AppxPackage | where {$_.Name -match "Facebook.Facebook"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "Microsoft.MinecraftUWP"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "king.com.CandyCrushSodaSaga"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "Microsoft.MicrosoftSolitaireCollection"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "Microsoft.XboxApp"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "king.com.ParadiseBay"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "D5EA27B7.Duolingo-LearnLanguagesforFree"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "46928bounde.EclipseManager"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "AdobeSystemsIncorporated.AdobePhotoshopExpress"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "Microsoft.BingNews"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "Microsoft.NetworkSpeedTest"} | Remove-AppxPackage
Get-AppxPackage | where {$_.Name -match "ActiproSoftwareLLC.562882FEEB491"} | Remove-AppxPackage
# Enable Hyper-V
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All -All -Verbose
#Enable Telnet Client
Enable-WindowsOptionalFeature -Online -FeatureName TelnetClient
#Install Posh-git (https://github.com/dahlbyk/posh-git)
Install-Module posh-git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment