Skip to content

Instantly share code, notes, and snippets.

@RickStrahl
Last active November 27, 2023 13:14
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save RickStrahl/f59619b6f1fc41da8c4e9c25d15bd4eb to your computer and use it in GitHub Desktop.
Save RickStrahl/f59619b6f1fc41da8c4e9c25d15bd4eb to your computer and use it in GitHub Desktop.
Windows Configuration

Windows Setup Notes

based on original document from Alan Stevens

Installation

IMPORTANT:

  • Install using Local Account first, attach Microsoft account later

System Updates:

  • Settings -> Update & Security
  • Install all updates

Explorer:

  • View Menu-> Options: Show Hidden Files, Protected Files, extensions

Reverse scroll wheel:

  • Not needed in Parallels
  • Settings -> Devices -> Mouse & touchpad, Reverse Scrolling Direction
  • If no touch pad do this

Setup and Configuration Scripts from Microsoft

Powershell Execution Policy:

  • Admin Powershell
  • Set-ExecutionPolicy Unrestricted

Copy Tool and Script Folders from old Machine

  • Copy folders from old machine:
    • \utl
    • \admin
  • Add c:\utl to User path
  • Change Machine Name
  • Change Network to WESTWIND

Network Policy

  • Change Private Network Access Policy
  • Turn on Network Discovery
  • Turn on File and Printer Sharing
  • Reboot

Restore other files from Backup

  • This takes a while so start it and let it run
  • Development folders

Install Chocolatey:

choco feature enable -n allowGlobalConfirmation  
choco feature enable -n allowEmptyChecksums

# First items to install
choco install vscode googlechrome filezilla firefox 

# then run scripts from `\Admin\MachineConfig` folder

Install Visual Studio First!

Yes this sounds silly but it'll make sure that anything you install with VS can be installed where you want it to with a re-install. Also extensions etc. can be installed with chocolatey afterwards.

SQL Server 2017 Developer Edition:

  • Download and install
  • Just install database engine services
  • Mixed mode. Add Administrators group and current user to server administrators.
  • must be installed before SQL Server Management Studio

Windows Bash:

  • Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Install IIS

  • Run OptionalFeatures.exe
  • Choose IIS and tick options
  • Or use Install-IIS Powershell script (Admin scripts)

Git

  • Install git manually to select custom settings
  • De-select "Windows Explorer Integration"
  • Select "Use Git and optional Unix tools from the Windows Command Prompt"

Install Chocolatey App and Dev Packages

  • Use Admin folder scripts
  • Install Chocolatey packages

Manually Installs

  • Visual FoxPro

Manually install special Licensed Applications (licenses)

  • Nitro Pro
  • Corel Draw
  • QuickBooks

Manually install special Licensed Components

  • ActiveBar ActiveX (Help Builder)
  • Sandbar (WebStore Client)
  • DevExpress Reports (WebStore Client)

Manually install Applications

  • WinZip
  • WinZip Self Extractor

Powershell

  • In an administrator prompt:
  • Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
  • Install-Module Get-ChildItemColor
  • Install-Module PSReadLine

Windows Configuration

Reverse Touchpad Scroll Direction

  • Settings -> TouchPad -> Scrolling Direction (Down Motion scrolls down)

Disable Hibernation and remove hiberfil.sys

  • In an admin console: powercfg -h off
  • Reboot

TEMP folder in known location

  • Add c:\temp folder
  • Add c:\temp\tmpfiles
  • Set TMP and TMP Environment Vars to c:\temp\tmpfiles

Defender Exclusions

  • Go to: Virus and Thread Protection Settings -> Exclusions
  • Projects Folder
  • Temp Folder
  • Visual Studio Folder
  • Resharper: %LOCALAPPDATA%\JetBrains\Transient

set git config defaults:

  • git config --global user.name "Rick Strahl"
  • git config --global user.email "rstrahl@west-wind.com"

Visual Studio

  • Add External Commands:

    • Explorer - Ctrl-Shift-\
    • ConEmu - Ctrl-Alt-\
      C:\Program Files\ConEmu\ConEmu64.exe
      /dir $(ItemDir) /cmd {Powershell:Admin}
  • Extensions

    • Add New File
    • Web Compiler
    • Image Optimizer
    • File Nesting

Configure ConEmu

  • Copy ConEmu.xml from old computer

Configure PowerShell Startup Prompt

  • code ~\Documents\WindowsPowerShell\Microsoft.PowerShell_Profile.ps1
# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
  Import-Module "$ChocolateyProfile"
}


# Import-Module posh-git 
# #Add-PoshGitToProfile
# $GitPromptSettings.DefaultPromptSuffix = '`n$(''>'' * ($nestedPromptLevel + 1)) '
# $GitPromptSettings.DefaultForegroundColor = 'Yellow'

function prompt {
  # Just prettify the prompt
  #Write-Host -NoNewline -ForegroundColor Cyan "PS "
  $dir = $(get-location).ProviderPath
  Write-Host -ForegroundColor Yellow "PS $dir"
  
  # # You may use ANSI or direct ConEmuC call
  # if ($env:ConEmuBaseDir -ne $null) {
  # # Write-Host -NoNewline (([char]27) + "]9;9;`"" + $dir + "`"" + ([char]27) + "\")
  # & ConEmuC.exe -StoreCWD "$dir"
  # }
  return "> "
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment