Skip to content

Instantly share code, notes, and snippets.

@shurick81
Last active February 19, 2025 07:31
Show Gist options
  • Save shurick81/3f705af1c38a66a9d7c299253a3e7730 to your computer and use it in GitHub Desktop.
Save shurick81/3f705af1c38a66a9d7c299253a3e7730 to your computer and use it in GitHub Desktop.
Laptop provisioning
# Baseline
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module PnP.PowerShell -Force
Install-Module MSOnline -Force
Install-Module AzureAD -Force
Set-ExecutionPolicy Bypass -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# Connection and security
choco install -y forticlientvpn
#choco install -y keepass
choco install -y citrix-receiver
choco install -y vmware-horizon-client
Enable-WindowsOptionalFeature -Online -FeatureName TelnetClient
choco install -y microsoftazurestorageexplorer
Stop-Service CloudflareWARP
Set-Service CloudflareWARP -StartupType Disabled
# Office and communication
# choco install -y microsoft-teams
choco install -y slack
choco install -y whatsapp
choco install -y telegram
choco install -y discord
# choco install -y office365proplus
choco install -y onedrive
choco install -y teamviewer
choco install -y jabra-direct
# Creativity
choco install -y paint.net
choco install -y drawio
choco install -y fsviewer
choco install -y obs-studio
choco install -y vlc
choco install -y greenshot
choco install -y audacity
choco install -y zoomit
choco install -y 7zip
Get-WindowsCapability -Online | where name -like Media.MediaFeaturePack* | Add-WindowsCapability -Online
# Browsers
choco install -y googlechrome
choco install -y firefox
# Dev tools
choco install -y git
choco install -y rdcman
choco install -y vscode
choco install -y rufus
choco install -y microsoft-windows-terminal
choco install -y fiddler
choco install -y dotnet-sdk
# Virtualization
# Run for executing Windows containers
# choco install -y docker-engine
# Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V, Containers -All
# DO NOT agree to reboot after the following line. It more beneficial to reboot later
Enable-WindowsOptionalFeature -Online -FeatureName "Microsoft-Windows-Subsystem-Linux", "VirtualMachinePlatform" -NoRestart
Invoke-WebRequest -Uri https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi -OutFile wsl_update_x64.msi -UseBasicParsing
Start-Process msiexec.exe -Wait -ArgumentList "/I $((Get-Location).Path)\wsl_update_x64.msi /quiet"
#Invoke-WebRequest -Uri https://go.microsoft.com/fwlink/?linkid=2068602 -OutFile RemoteDesktop_x64.msi -UseBasicParsing
#Start-Process msiexec.exe -Wait -ArgumentList "/I $((Get-Location).Path)\RemoteDesktop_x64.msi /quiet"
# Reboot the machine before you continue
wsl --set-default-version 2
wsl --install --distribution Ubuntu-20.04
# Installing extensions
choco install -y vscode-powershell
# code --install-extension ms-vscode.PowerShell
code --install-extension eamodio.gitlens
code --install-extension ms-azure-devops.azure-pipelines
code --install-extension HashiCorp.terraform
code --install-extension redhat.vscode-xml
code --install-extension bierner.markdown-mermaid
code --install-extension ms-vscode-remote.remote-containers
code --install-extension ms-azuretools.vscode-docker
code --install-extension GitHub.codespaces
code --install-extension ms-vscode.live-server
code --install-extension DotJoshJohnson.xml
code --install-extension ms-azuretools.vscode-bicep
code --install-extension donjayamanne.githistory
code --install-extension hashicorp.hcl
code --install-extension ms-azuretools.vscode-azurefunctions
code --install-extension HashiCorp.HCL
code --install-extension shardulm94.trailing-spaces
# npm install -g gulp
git config --global user.email "[email protected]"
git config --global user.name "Aleks"
# Run in Ubuntu:
bash <(curl -s https://get.docker.com/)
sudo usermod -aG docker $USER
newgrp docker
cat <<EOF | sudo tee /etc/wsl.conf
[network]
generateResolvConf = false
EOF
cat <<EOF | sudo tee /etc/resolv.conf
nameserver 8.8.8.8
EOF
sudo dockerd
# Make sure that Windows processes like Explorer and Visual Studio Code have write-access to home directory
sudo chmod -R u=rwx,g=rx,o=rwx .
# Update
choco outdated
choco upgrade all -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment