Last active
March 13, 2019 02:52
-
-
Save larymao/f0ffa843cfc908d161a480594100846f to your computer and use it in GitHub Desktop.
Shells for recovering Lary's windows environment.
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
# Install boxstarter | |
. { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# --- Apps --- | |
# normal | |
choco install -y googlechrome | |
choco install -y telegram | |
choco install -y winrar | |
choco install -y teamviewer | |
# dev | |
choco install -y visualstudio2017enterprise | |
choco install -y vscode | |
choco install -y ilspy | |
choco install -y mremoteng | |
choco install -y postman | |
choco install -y fiddler | |
choco install -y winscp | |
choco install -y docker-for-windows | |
choco install -y dotnetcore-sdk | |
choco install -y nodejs | |
choco install -y consul | |
choco install -y rabbitmq | |
choco install -y redis-64 | |
npm install -g commitizen | |
# --- Uninstall unecessary applications that come with Windows out of the box --- | |
# BubbleWitch | |
Get-AppxPackage *BubbleWitch* | Remove-AppxPackage | |
# Candy Crush | |
Get-AppxPackage king.com.CandyCrush* | Remove-AppxPackage | |
# Minecraft | |
Get-AppxPackage *Minecraft* | 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 | |
} | |
# --- Windows Subsystems/Features --- | |
choco install Microsoft-Hyper-V-All -source windowsFeatures | |
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures | |
# --- Windows Settings --- | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
# 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 | |
# 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 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 | |
#--- Rename Computer --- | |
# Requires restart, or add the -Restart flag | |
# $computername = "Lary-Zone" | |
# if ($env:computername -ne $computername) { | |
# Rename-Computer -NewName $computername | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment