Last active
November 30, 2017 18:38
-
-
Save juchom/7781b87b66d126ea0aef7aaf0c0365cd to your computer and use it in GitHub Desktop.
Windows 10 Fall Creator Update setup scrit
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
# Description: Powershell install script | |
# Author: Julien Chomarat | |
# Last Updated: 2017-11-06 | |
# Thanks goes to: | |
# Jessie Frazelle: https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f | |
# Nick Craver: https://gist.github.com/NickCraver/7ebf9efbfd0c3eab72e9 | |
# ElJefeDSecurIT: https://gist.github.com/ElJefeDSecurIT/014fcfb87a7372d64934995b5f09683e | |
#---- TEMPORARY --- | |
# Disabling UAC | |
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA -Value 0 | |
#--- Windows Settings --- | |
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol -NoRestart | |
# disable Fax & Scan, XPS formats, XPS printing services, or printing to http printers. | |
Disable-WindowsOptionalFeature -Online -FeatureName FaxServicesClientPackage -NoRestart | |
Disable-WindowsOptionalFeature -Online -FeatureName Xps-Foundation-Xps-Viewer -NoRestart | |
Disable-WindowsOptionalFeature -Online -FeatureName Printing-XPSServices-Features -NoRestart | |
Disable-WindowsOptionalFeature -Online -FeatureName Printing-Foundation-InternetPrinting-Client -NoRestart | |
# disable media playback. | |
Disable-WindowsOptionalFeature -Online -FeatureName WindowsMediaPlayer -NoRestart | |
Disable-WindowsOptionalFeature -Online -FeatureName MediaPlayback -NoRestart | |
# Tablet input: pssh nobody use tablet input. its silly.just write right in onenote | |
Set-service -Name TabletInputService -StartupType Disabled | |
# Telephony API is tell-a-phony | |
Set-service -Name TapiSrv -StartupType Disabled | |
# i don't use iscsi | |
Set-service -Name MSISCSI -StartupType Disabled | |
# why is SNMPTRAP still on windows 10? i mean, really, who uses SNMP? is it even a real protocol anymore? | |
Set-service -Name SNMPTRAP -StartupType Disabled | |
# Start Menu: Disable Bing Search Results | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 0 | |
# Disable GameBarTips | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\GameBar -Name ShowStartupPanel -Type DWord -Value 0 | |
# Show hidden folders & files | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name Hidden -Type Dword -Value 1 | |
# Show file extension | |
Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name HideFileExt -Type Dword -Value 0 | |
Install-PackageProvider -Name "NuGet" -Force | |
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" | |
choco feature enable -n=allowGlobalConfirmation | |
#--- Windows Subsystems/Features --- | |
# these are also available for scripting directly on windows and installing natively via Enable-WindowsOptionalFeature. | |
# if you wanna know what's available, try this: | |
# Get-WindowsOptionalFeature -Online | sort @{Expression = "State"; Descending = $True}, @{Expression = "FeatureName"; Descending = $False}| Format-Table -GroupBy State | |
choco install Microsoft-Windows-Subsystem-Linux -source windowsfeatures | |
choco install Microsoft-Hyper-V-All -source windowsFeatures | |
choco install adobereader | |
choco install conemu | |
choco install git -params '"/GitAndUnixToolsOnPath /WindowsTerminal"' | |
choco install googlechrome | |
choco install keepass | |
choco install nodejs | |
choco install notepadplusplus | |
choco install paint.net | |
choco install skype | |
choco install sysinternals | |
choco install vlc | |
choco install winrar | |
choco install winscp | |
choco install xnview | |
Update-SessionEnvironment | |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | |
Install-Module posh-git -Scope AllUsers | |
Install-Module oh-my-posh -Scope AllUsers | |
Install-Module ACMESharp -Scope AllUsers | |
npm install --global npm-check | |
$source = 'C:\source' | |
If (!(Test-Path -Path $source -PathType Container)) {New-Item -Path $source -ItemType Directory | Out-Null} | |
$packages = @( | |
@{title='Linqpad 5';url='http://www.linqpad.net/GetFile.aspx?LINQPad5Setup.exe';FileName='LINQPad5Setup.exe';Arguments=' /silent';Destination=$source}, | |
@{title='Azure Storage Explorer';url='https://go.microsoft.com/fwlink/?LinkId=708343';FileName='StorageExplorer.exe';Arguments=' /verysilent /suppressmsgboxes';Destination=$source}, | |
@{title='Visual Studio Code';url='https://go.microsoft.com/fwlink/?Linkid=852157';FileName='VSCodeSetup-x64.exe';Arguments=' /verysilent /suppressmsgboxes /mergetasks="!runCode"';Destination=$source} | |
) | |
foreach ($package in $packages) { | |
$packageName = $package.title | |
$fileName = $package.FileName | |
$destinationPath = $package.Destination + "\" + $fileName | |
If (!(Test-Path -Path $destinationPath -PathType Leaf)) { | |
Write-Host "Downloading $packageName" | |
$webClient = New-Object System.Net.WebClient | |
$webClient.DownloadFile($package.url,$destinationPath) | |
} | |
} | |
#Once we've downloaded all our files lets install them. | |
foreach ($package in $packages) { | |
$packageName = $package.title | |
$fileName = $package.FileName | |
$destinationPath = $package.Destination + "\" + $fileName | |
$Arguments = $package.Arguments | |
Write-Output "Installing $packageName" | |
Start-Process -FilePath $destinationPath -ArgumentList $Arguments -Wait | |
} | |
#--- Uninstall unecessary applications that come with Windows out of the box --- | |
#Write-BoxstarterMessage "*** Store Apps Cleanup ***" | |
$apps = @( | |
# default Windows 10 FCU apps | |
"9E2F88E3.Twitter" | |
"A278AB0D.MarchofEmpires" | |
"Facebook.Facebook" | |
"king.com.CandyCrushSodaSaga" | |
"Microsoft.Getstarted" | |
"Microsoft.GetHelp" | |
"Microsoft.MicrosoftOfficeHub" | |
"Microsoft.MinecraftUWP" | |
"Microsoft.OneConnect" | |
"Microsoft.XboxApp" | |
"Microsoft.WindowsFeedbackHub" | |
"Microsoft.ZuneMusic" | |
"Microsoft.ZuneVideo" | |
) | |
foreach ($app in $apps) { | |
Write-Output "Trying to remove $app" | |
Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage | |
Get-AppXProvisionedPackage -Online | | |
Where-Object DisplayName -EQ $app | | |
Remove-AppxProvisionedPackage -Online -AllUsers | |
} | |
# Making sure we have one french azerty keyboard mapping | |
$langList = New-WinUserLanguageList en-US | |
$langList[0].InputMethodTips.Clear() | |
$langList[0].InputMethodTips.Add('0409:0000040C') | |
Set-WinUserLanguageList $langList | |
# Setting date, time, currency format | |
Set-Culture fr-FR | |
# 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 | |
# Privacy: SmartScreen Filter for Store Apps: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -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 | |
# Disable Telemetry (requires a reboot to take effect) | |
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 | |
# Disable P2P Update downlods outside of local network | |
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config -Name DODownloadMode -Type DWord -Value 1 | |
If (-Not (Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization")) { | |
New-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization | Out-Null | |
} | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization -Name SystemSettingsDownloadMode -Type DWord -Value 3 | |
#--- Restore Temporary Settings --- | |
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -Name EnableLUA -Value 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment