Last active
May 20, 2021 09:18
-
-
Save NBprojekt/e78bc463dee9c85d49d99e85c43fa411 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
# This command may be required before executing the script | |
#Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine -Force; | |
# Logs are placed on the current users desktop | |
Start-Transcript -Path "~/Desktop/install.log"; | |
# Install Chocolatey | |
$chocoVersion = powershell choco -v; | |
if(-not($chocoVersion)) { | |
Write-Output "Seems Chocolatey is not installed, installing now"; | |
Set-ExecutionPolicy Bypass -Scope Process -Force; | |
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; | |
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); | |
} else{ | |
Write-Output "Chocolatey Version $chocoVersion is already installed"; | |
} | |
# Disable features | |
Write-Host "Disable unneeded features:" | |
Disable-WindowsOptionalFeature -FeatureName Internet-Explorer-Optional-amd64 –Online -NoRestart; # IE | |
Write-Host "Internet explorer: " (&{If($?) {"disabled"} Else {"failed"}}); | |
Get-AppxPackage -allusers Microsoft.549981C3F5F10 | Remove-AppxPackage; # Cortana | |
Write-Host "Cortana: " (&{If($?) {"disabled"} Else {"failed"}}); | |
# Packages | |
Write-Host "Installing packages:" | |
choco install googlechrome -y; | |
#choco install firefox -y; | |
choco install steam-client -y; | |
choco install 7zip -y; | |
choco install adobereader -y; | |
# End logs and restart | |
Write-Host "Restarting after log ends"; | |
Write-Host "Done."; | |
Stop-Transcript; | |
Restart-Computer -Force; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment