sudo apt install zsh -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# ============= | |
# Run terminal as admin, then run 'powershell.exe -ExecutionPolicy Unrestricted' | |
# to start powershell session in unrestricted mode | |
# https://learn.microsoft.com/th-th/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.4 | |
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } | |
# get all input parameter | |
$computerName = Read-Host 'Change Computer Name from [' $env:COMPUTERNAME '] to (blank to skip) ' | |
$monitorTimeout = Read-Host 'Set monitor timeout to __ second (blank to skip) ' |
Write-Information "This script needs be run on Windows Server 2019 or 2022" | |
If ($PSVersionTable.PSVersion.Major -ge 7){ Write-Error "This script needs be run by version of PowerShell prior to 7.0" } | |
# Define environment variables | |
$downloadDir = "C:\WinTerminal" | |
$gitRepo = "microsoft/terminal" | |
$filenamePattern = "*.msixbundle" | |
$framworkPkgUrl = "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" | |
$framworkPkgPath = "$downloadDir\Microsoft.VCLibs.x64.14.00.Desktop.appx" | |
$xamlPkgUrl = "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.5/Microsoft.UI.Xaml.2.8.x64.appx" |
#!/bin/bash | |
sudo apt update | |
sudo apt install openjdk-11-jdk -y | |
sudo apt install maven -y | |
curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \ | |
/usr/share/keyrings/jenkins-keyring.asc > /dev/null | |
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ | |
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ | |
/etc/apt/sources.list.d/jenkins.list > /dev/null | |
sudo apt-get update |
Write-Information "This script needs be run on Windows Server 2019 or 2022" | |
If ($PSVersionTable.PSVersion.Major -ge 7){ Write-Error "This script needs be run by version of PowerShell prior to 7.0" } | |
# Define environment variables | |
$downloadDir = "C:\WinTerminal" | |
$gitRepo = "microsoft/terminal" | |
$filenamePattern = "*.msixbundle" | |
$framworkPkgUrl = "https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx" | |
$framworkPkgPath = "$downloadDir\Microsoft.VCLibs.x64.14.00.Desktop.appx" | |
$msiPath = "$downloadDir\Microsoft.WindowsTerminal.msixbundle" |
# MIT License | |
# Copyright (c) 2023 Dawid Goslawski | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
# Switch Windows light/dark theme | |
$regkey = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" | |
$appProp = "AppsUseLightTheme" | |
$sysProp = "SystemUsesLightTheme" | |
$currVal = Get-ItemProperty -Path $regKey -Name $appProp | Select-Object -exp $appProp | |
$newVal = !$currVal + 0; | |
Set-ItemProperty -Path $regKey -Name $appProp -Value $newVal -Type Dword -Force; | |
Set-ItemProperty -Path $regKey -Name $sysProp -Value $newVal -Type Dword -Force; |
mkdir c:\github | |
winget install --id=Git.Git -e --accept-package-agreements --accept-source-agreements | |
winget install --id=Microsoft.VisualStudioCode -e | |
winget install --id=AgileBits.1Password -e | |
winget install --id=7zip.7zip -e | |
winget install --id=Twilio.Authy -e | |
winget install --id=Bethesda.Launcher -e | |
winget install --id=Microsoft.Bicep -e | |
winget install --id=Microsoft.bitsmanager -e | |
winget install --id=BrutalChess.BrutalChess -e |
View details here: https://gist.github.com/xynova/87beae35688476efb2ee290d3926f5bb
References:
Start /WAIT /B Winget install "Microsoft.PowerShell.Preview" --force --accept-package-agreements --accept-source-agreements | |
Start /WAIT /B Winget install "Microsoft.WindowsTerminal" --force --accept-package-agreements --accept-source-agreements | |
Start /WAIT /B Winget install "Microsoft XNA Framework Redistributable Refresh" --force --accept-package-agreements --accept-source-agreements &REM *Needs alone time, no other install* | |
Start /WAIT /B Winget install "Microsoft.VisualStudio.2022.Community" --force --accept-package-agreements --accept-source-agreements | |
REM Install all of the VC++ Redistributables | |
Start /WAIT /B Winget install "Microsoft Visual C++ 2005 Redistributable" --force --accept-package-agreements --accept-source-agreements | |
Start /WAIT /B Winget install "Microsoft Visual C++ 2005 Redistributable (x64)" --force --accept-package-agreements --accept-source-agreements | |
Start /WAIT /B Winget install "Microsoft Visual C++ 2008 Redistributable - x64" --force --accept-package-agreements --accept-source-ag |