Skip to content

Instantly share code, notes, and snippets.

@shawnweisfeld
Last active November 22, 2018 15:51
Show Gist options
  • Save shawnweisfeld/44eeafc74e9097a24288ef6589162e47 to your computer and use it in GitHub Desktop.
Save shawnweisfeld/44eeafc74e9097a24288ef6589162e47 to your computer and use it in GitHub Desktop.
ChickTech Laptop Setup

ChickTech Laptop Setup

This document can be found at http://aka.ms/ChickTechLaptopSetup

Install chocolatey

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Install software

choco install 7zip.install -y
choco install GoogleChrome -y
choco install firefox -y
choco install vlc -y
choco install paint.net -y
choco install visualstudiocode -y
choco install libreoffice-fresh

Install Windows Subsystem for Linux

as Owner

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

as chicktech Install Ubuntu via the store

Update Ubuntu

sudo apt-get -q update && sudo apt-get -q upgrade && sudo apt-get -q dist-upgrade && sudo apt -q autoremove

More Info Official Instructions

Windows Update

be sure to turn on updates for all microsoft products

Windows Store Commands

Check for installed games

Get-AppxPackage -AllUsers | where {($_.Name -notlike "Microsoft*" -and $_.Name -notlike "Windows*")} | Select Name, PackageFullName
Remove-AppxPackage -AllUsers -Package <<PackageFullName>>

WSL intructions from steve


[CmdletBinding()]
param
(
    [Parameter(Mandatory = $true)]
    [string] $distro
)
trap
{
    # NOTE: This trap will handle all errors. There should be no need to use a catch below in this
    #       script, unless you want to ignore a specific error.
    $message = $Error[0].Exception.Message
    if ($message)
    {
        Write-Host -Object "`nERROR: $message" -ForegroundColor Red
    }

    Write-Host "`nThe artifact failed to apply.`n"

    # IMPORTANT NOTE: Throwing a terminating error (using $ErrorActionPreference = "Stop") still
    # returns exit code zero from the PowerShell script when using -File. The workaround is to
    # NOT use -File when calling this script and leverage the try-catch-finally block and return
    # a non-zero exit code from the catch block.
    exit -1
}
try
{
    Write-Output "Creating Ubuntu Distro Folder"
        $sysDrive = $env:SystemRoot.Substring(0,3)
        $ubuntuPath=New-Item -ItemType Directory -Force -Path $sysDrive\Distros\
        Set-Location $ubuntuPath

    Write-Output "Downloading Ubuntu Distro"    
        Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-$distro -OutFile Ubuntu.appx -UseBasicParsing

    Write-Output "Renaming .appx to .zip"    
        Rename-Item $ubuntuPath/Ubuntu.appx $ubuntuPath/Ubuntu.zip

    Write-Output "Unzipping Distro"    
        Expand-Archive $ubuntuPath/Ubuntu.zip $ubuntuPath/Ubuntu

    Write-Output "Installing Ubuntu"      
        $installerPath=Get-ChildItem -Path $ubuntuPath/Ubuntu -include ubuntu* | where {$_.Extension -eq ".exe"}
        "$installerPath install --root" | cmd
}
finally
{
    popd
} 

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