Skip to content

Instantly share code, notes, and snippets.

@lcenchew
Last active June 23, 2023 11:21
Show Gist options
  • Save lcenchew/c879176df48ed77e9ffe33b1fd24bce5 to your computer and use it in GitHub Desktop.
Save lcenchew/c879176df48ed77e9ffe33b1fd24bce5 to your computer and use it in GitHub Desktop.
Notes - Windows #notes

Windows

PowerShell

  • version 7 install newer Powershell
winget search Microsoft.PowerShell
winget install --id Microsoft.Powershell --source winget
pwsh
$env:PATH
$env:PATH += ';PATH_TO_APPEND'

create a profile for current user, current host

if (!(Test-Path -Path $PROFILE)) {
  New-Item -ItemType File -Path $PROFILE -Force
}

Windows Package Manager

Install-Module -Name Microsoft.WinGet.Client
winget install -e --id KeePassXCTeam.KeePassXC

Install common tools

Find packages to install https://winget.run/

winget install -e --id Microsoft.VisualStudioCode
winget install -e --id dbeaver.dbeaver
winget install -e --id Python.Python.3.11
winget install -e --id OpenVPNTechnologies.OpenVPNConnect
winget install -e --id Amazon.AWSCLI

Chocolatey

These days not using Chocolatey anymore.

  • Run PowerShell as administrator
Set-ExecutionPolicy Bypass -Scope Process -Force
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex

Install common apps

choco install -y googlechrome
choco install -y firefox
choco install -y vscode
choco install -y git --package-parameters="'/GitAndUnixToolsOnPath /WindowsTerminal'"
choco install -y python

WSL (Windows Subsystem for Linux)

https://aka.ms/wslstoreinfo

wsl.exe --install
wsl.exe --update

wsl --list --online
wsl --install <Distribution Name>

wsl --status

https://learn.microsoft.com/en-us/windows/wsl/setup/environment

Setup

Automation

AWS EC2

AMI: Windows_Server-2022-English-Full-Base-2021.10.13

New instance setup

  • create new user
  • add to Remote Desktop Users group

Powershell for AWS

https://docs.aws.amazon.com/powershell/

Get-DefaultAWSRegion
Get-AWSCmdletName -ApiOperation SecurityGroup -MatchWithRegex

Windows Admin Center https://docs.microsoft.com/en-us/windows-server/manage/windows-admin-center/overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment