Last active
June 19, 2020 20:00
-
-
Save michaelrinderle/644b6f2c4817dafeeb6b8507f009c285 to your computer and use it in GitHub Desktop.
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
# Boxstarter options | |
$Boxstarter.RebootOk=$true # Allow reboots? | |
# OS Options | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-MicrosoftUpdate | |
Disable-GameBarTips | |
Disable-BingSearch | |
Disable-InternetExplorerESC | |
Set-TaskbarOptions -Size Small | |
# Activate Windows Features | |
cinst Microsoft-Windows-Subsystem-Linux -source windowsfeatures | |
cinst VirtualMachinePlatform -source windowsfeatures | |
# install wsl distributions | |
Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1804 -OutFile ~/Ubuntu1804.appx -UseBasicParsing | |
Add-AppxPackage -Path ~/Ubuntu1804.appx | |
Remove-Item ~/Ubuntu1804.appx | |
Invoke-WebRequest -Uri https://aka.ms/wsl-debian-gnulinux -OutFile ~/Debian.appx -UseBasicParsing | |
Add-AppxPackage -Path ~/Debian.appx | |
Remove-Item ~/Debian.appx | |
Invoke-WebRequest -Uri https://aka.ms/wsl-kali-linux-new -OutFile ~/Kali.appx -UseBasicParsing | |
Add-AppxPackage -Path ~/Kali.appx | |
Remove-Item ~/Kali.appx | |
# choco program list install | |
choco feature enable -n allowGlobalConfirmation | |
cinst git | |
cinst keepassx | |
cinst brave | |
cinst 7zip | |
cinst simplewall | |
cinst winscp | |
cinst putty | |
cinst vlc | |
cint nmap | |
cinst wireshark | |
cinst visualstudiocode | |
# install vs code extensions | |
code --install-extension esbenp.prettier-vscode | |
ode --install-extension ms-vscode.csharp | |
# change program configs | |
New-Item $env:appdata\KeePass -ItemType directory -Force | |
Invoke-WebRequest -OutFile $env:appdata\KeePass\KeePass.config.xml -Uri "https://gist.githubusercontent.com/michaelrinderle/644b6f2c4817dafeeb6b8507f009c285/raw/47f87e019d0f844e9ae7551b737500a42d606815/kpx-config.xml" | |
Invoke-WebRequest -OutFile $env:appdata\Code\User\settings.json -Uri "https://gist.githubusercontent.com/michaelrinderle/644b6f2c4817dafeeb6b8507f009c285/raw/47f87e019d0f844e9ae7551b737500a42d606815/vscode-settings.json" | |
# git config | |
git config --global core.editor "code --wait" | |
git config --global user.name "michael rinderle" | |
git config --global user.email "[email protected]" | |
# uninstall bloatware | |
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsAlarms | Remove-AppxPackage | |
Get-AppxPackage *Autodesk* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingNews | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingSports | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage | |
Get-AppxPackage *BubbleWitch* | Remove-AppxPackage | |
Get-AppxPackage king.com.CandyCrush* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.CommsPhone | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Getstarted | Remove-AppxPackage | |
Get-AppxPackage *Minecraft* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.MicrosoftOfficeHub | Remove-AppxPackage | |
Get-AppxPackage Microsoft.Office.OneNote | Remove-AppxPackage | |
Get-AppxPackage Microsoft.XboxApp | Remove-AppxPackage | |
Get-AppxPackage Microsoft.XboxIdentityProvider | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsMaps | Remove-AppxPackage | |
Get-AppxPackage *MarchofEmpires* | Remove-AppxPackage | |
Get-AppxPackage *Netflix* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.People | Remove-AppxPackage | |
Get-AppxPackage *Plex* | Remove-AppxPackage | |
Get-AppxPackage Microsoft.SkypeApp | Remove-AppxPackage | |
# disable bing search results in start menu | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search -Name BingSearchEnabled -Type DWord -Value 0 | |
# disable advertising id | |
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 | |
# disable hotspot sharing | |
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 | |
# disable hotstop sharing autoconnect | |
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 | |
# disable the Lock Screen (the one before password prompt - to prevent dropping the first character) | |
If (-Not (Test-Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization)) { | |
New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows -Name Personalization | Out-Null | |
} | |
Set-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -Type DWord -Value 1 | |
# lock screen (not sleep) on lid close | |
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power' -Name AwayModeEnabled -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 | |
$name = "Node1" | |
if ($env:computername -ne $computername) { | |
Rename-Computer -NewName $name | |
} | |
# install updates | |
Install-WindowsUpdate -AcceptEula | |
# https://serverfault.com/questions/259381/how-to-enable-volume-shadow-copy-using-powershell | |
# enable shadow copies | |
$diskname = "C:\" | |
$VolumeWmi = gwmi Win32_Volume -Namespace root/cimv2 | ?{ $_.Name -eq $diskname } | |
$DeviceID = $VolumeWmi.DeviceID.ToUpper().Replace("\\?\VOLUME", "").Replace("\","") | |
$TaskName = "ShadowCopyVolume" + $DeviceID | |
$TaskFor = "\\?\Volume" + $DeviceID + "\" | |
$Task = "C:\Windows\system32\vssadmin.exe" | |
$Argument = "Create Shadow /AutoRetry=15 /For=$TaskFor" | |
$WorkingDir = "%systemroot%\system32" | |
$ScheduledAction = New-ScheduledTaskAction –Execute $Task -WorkingDirectory $WorkingDir -Argument $Argument | |
$ScheduledTrigger = @() | |
$ScheduledTrigger += New-ScheduledTaskTrigger -Daily -At 10:00 | |
$ScheduledTrigger += New-ScheduledTaskTrigger -Daily -At 15:00 | |
$ScheduledSettings = New-ScheduledTaskSettingsSet -Compatibility V1 -DontStopOnIdleEnd -ExecutionTimeLimit (New-TimeSpan -Days 3) -Priority 5 | |
$ScheduledTask = New-ScheduledTask -Action $ScheduledAction -Trigger $ScheduledTrigger -Settings $ScheduledSettings | |
Register-ScheduledTask $TaskName -InputObject $ScheduledTask -User "NT AUTHORITY\SYSTEM" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Configuration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<Application> | |
<Start> | |
<CheckForUpdate>true</CheckForUpdate> | |
<CheckForUpdateConfigured>true</CheckForUpdateConfigured> | |
<MinimizedAndLocked>true</MinimizedAndLocked> | |
</Start> | |
<FileOpening /> | |
<FileClosing /> | |
</Application> | |
<Logging /> | |
<UI> | |
<TrayIcon /> | |
<Hiding /> | |
<UIFlags>0</UIFlags> | |
<KeyCreationFlags>0</KeyCreationFlags> | |
<KeyPromptFlags>0</KeyPromptFlags> | |
</UI> | |
<Security> | |
<WorkspaceLocking> | |
<LockAfterTime>0</LockAfterTime> | |
<LockAfterGlobalTime>0</LockAfterGlobalTime> | |
</WorkspaceLocking> | |
<Policy /> | |
<MasterPassword> | |
<MinimumLength>0</MinimumLength> | |
<MinimumQuality>0</MinimumQuality> | |
</MasterPassword> | |
</Security> | |
<Native /> | |
<Defaults> | |
<OptionsTabIndex>2</OptionsTabIndex> | |
<SearchParameters> | |
<ComparisonMode>InvariantCultureIgnoreCase</ComparisonMode> | |
</SearchParameters> | |
</Defaults> | |
<Integration> | |
<HotKeyGlobalAutoType>131294</HotKeyGlobalAutoType> | |
<HotKeySelectedAutoType>0</HotKeySelectedAutoType> | |
<HotKeyShowWindow>393291</HotKeyShowWindow> | |
<HotKeyEntryMenu>0</HotKeyEntryMenu> | |
<UrlSchemeOverrides> | |
<BuiltInOverridesEnabled>1</BuiltInOverridesEnabled> | |
<CustomOverrides /> | |
</UrlSchemeOverrides> | |
<AutoTypeAbortOnWindows /> | |
<ProxyType>System</ProxyType> | |
<ProxyAuthType>Auto</ProxyAuthType> | |
</Integration> | |
<Custom /> | |
</Configuration> |
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
{ | |
"workbench.activityBar.visible": false, | |
"git.confirmSync": false, | |
"git.enableSmartCommit": true, | |
"window.zoomLevel": 0, | |
"workbench.statusBar.visible": true, | |
"workbench.startupEditor": "none", | |
"editor.tabSize": 2, | |
"prettier.singleQuote": true, | |
"prettier.eslintIntegration": true, | |
"files.eol": "\n", | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment