Created
May 28, 2022 12:09
-
-
Save nilact/615709b557afd006bddd51c35140b401 to your computer and use it in GitHub Desktop.
For Installing software on Windows 11
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
# Based on the scripts of | |
# @jessfraz https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f | |
# @NickCraver https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9 | |
$ErrorActionPreference = "Stop" | |
Set-ExecutionPolicy Bypass -Scope Process -Force; | |
#Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
# Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -Lock | |
# Set-TaskbarOptions -Size Small -Dock Bottom -Combine Full -AlwaysShowIconsOn | |
## Install Chocolatey | |
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
#--- Fonts --- | |
choco install firacode -y | |
choco install cascadiacodepl -y | |
#--- Tools --- | |
choco install -y git.install | |
choco install -y 7zip | |
choco install -y notepad2 | |
choco install -y notepadplusplus | |
choco install -y powertoys | |
choco install -y nimbletext | |
choco install -y fiddler | |
choco install -y ditto.install | |
choco install -y zoomit | |
choco install -y curl | |
choco install -y nodejs.install | |
#--- Powershell things --- | |
Install-Module -Name posh-git,oh-my-posh,Terminal-Icons -Repository PSGallery -Scope CurrentUser | |
#--- Apps --- | |
#choco install -y googlechrome | |
#choco install -y brave | |
choco install -y firefox | |
#this installs Azure Data Studio as well | |
choco install -y sql-server-management-studio | |
choco install -y f.lux | |
choco install -y postman | |
choco install -y dotpeek | |
choco install -y visualstudiocode | |
choco install -y visualstudio2019community | |
choco install -y azure-cli | |
# Refresh path | |
refreshenv | |
#--- Uninstall unecessary applications that come with Windows out of the box --- | |
# Disables suggested apps in the start menu | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager -Name SystemPaneSuggestionsEnabled -Type DWord -Value 0 | |
# 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 | |
# Disney Magic Kingdom | |
Get-AppxPackage *DisneyMagicKingdom* | Remove-AppxPackage | |
# Dolby Access | |
Get-AppxPackage *DolbyAccess* | Remove-AppxPackage | |
# Dropbox | |
Get-AppxPackage *Dropbox* | Remove-AppxPackage | |
Get-AppxPackage *Facebook* | Remove-AppxPackage | |
# Feedback Hub | |
Get-AppxPackage Microsoft.WindowsFeedbackHub | Remove-AppxPackage | |
# Get Started | |
Get-AppxPackage Microsoft.Getstarted | Remove-AppxPackage | |
# Hidden City: Hidden Object Adventure | |
Get-AppxPackage *HiddenCityMysteryofShadows* | 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 | |
# Paint 3D | |
Get-AppxPackage Microsoft.MSPaint | 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 | |
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 | |
#--- Windows Settings --- | |
################## | |
# Privacy Settings | |
################## | |
# 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 | |
############################ | |
# Personal Preferences on UI | |
############################ | |
# 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 | |
############### | |
# Desktop Icons | |
############### | |
# Desktop icons | |
# Show | |
Set-ItemProperty -Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name HideIcons -Type DWord -Value 0 | |
# Hide | |
#Set-ItemProperty -Path "HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name HideIcons -Type DWord -Value 1 | |
# OneDrive | |
# Show | |
#Set-ItemProperty -Path "HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Type DWord -Value 1 | |
# Hide | |
Set-ItemProperty -Path "HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Type DWord -Value 0 | |
# My Computer/This PC | |
# Show | |
Set-ItemProperty -Path "HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -Type DWord -Value 0 | |
# Hide | |
#Set-ItemProperty -Path "HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -Type DWord -Value 1 | |
# Control Panel | |
# Show | |
#Set-ItemProperty -Path "HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}" -Type DWord -Value 0 | |
# Hide | |
Set-ItemProperty -Path "HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}" -Type DWord -Value 1 | |
# User's Files | |
# Show | |
# Set-ItemProperty -Path "HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" -Type DWord -Value 0 | |
# Hide | |
Set-ItemProperty -Path "HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" -Type DWord -Value 1 | |
# Recycle Bin | |
# Show | |
Set-ItemProperty -Path "HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{645FF040-5081-101B-9F08-00AA002F954E}" -Type DWord -Value 0 | |
# Hide | |
#Set-ItemProperty -Path "HKCU:Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" -Name "{645FF040-5081-101B-9F08-00AA002F954E}" -Type DWord -Value 1 | |
#--- Rename the Computer --- | |
# Requires restart, or add the -Restart flag | |
$computername = "NileshPC" | |
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