Skip to content

Instantly share code, notes, and snippets.

View PatrickLang's full-sized avatar

Patrick Lang PatrickLang

  • Washington, USA
View GitHub Profile
@PatrickLang
PatrickLang / server2016_slipstream.md
Last active July 20, 2023 07:52
Automated deployments of Windows Server 2016

This is a draft that will ultimately be blogged later. If you're seeing this after April 2017 it's probably out of date.

Making a pre-updated Windows Server 2016 ISO

Prerequisites

  1. Install the Windows Assessment and Deployment Toolkit
  2. Download a Windows Server 2016 ISO such as the trial here - TODO
  3. Download the latest cumulative update
@PatrickLang
PatrickLang / docker-compose.yml
Created March 20, 2017 15:43
Example compose file for WordPress & MariaDB
version: '2'
services:
wordpress:
image: wordpress
ports:
- 8080:80
environment:
WORDPRESS_DB_PASSWORD: Password123!
restart: always
depends_on:
@PatrickLang
PatrickLang / ACS Kubernetes with Windows demo.md
Last active March 22, 2017 21:56
ACS Kubernetes with Windows demo
@PatrickLang
PatrickLang / mikrotik-pxe.md
Last active August 11, 2023 08:59
Boot from Mikrotik router and install Windows

Using a Mikrotik router to boot and install Windows

Lately I've been using Mikrotik routers because they're cheap, powerful, and fast. Most of them have either a USB or MicroSD slot, so you can add enough space to store network boot images right on the router.

I got most of the tips needed from these two articles, and combined them into this step by step guide:

@PatrickLang
PatrickLang / winpe_bitlocker.md
Created April 13, 2017 00:04 — forked from anonymous/winpe_bitlocker.md
Making a WinPE device that can unlock a bootlocker'd drive

Adapted from http://digitalhacksblog.blogspot.com/2015/01/it-worked-for-me-winpe-bitlocker-and.html, updated for Windows 10

C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Deployment Tools>dism /mount-wim /wimfile:c:\winpe_amd64\media\sources\boot.wim /index:1 /mountdir:c:\winpe_amd64\mount

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Mounting image
[==========================100.0%==========================]
@PatrickLang
PatrickLang / sd_drivers_ws2016.md
Last active November 14, 2023 08:20
Booting Windows Server 2016 core from eMMC

Booting Windows Server 2016 Core from eMMC devices

Comparing drivers between Desktop & Core editions

The Windows installation ISO contains multiple Windows image files (WIM):

  • boot.wim - this is used to boot the Windows Preinstallation Environment (WinPE) for a clean install
  • install.wim - this contains the image(s) that will be installed.

The Windows Server 2016 ISO contains multiple versions in this single install.wim file which is why the same media can be used to install Standard or Datacenter editions, with the desktop experience or without it (core).

@PatrickLang
PatrickLang / README.md
Last active May 20, 2017 07:38
Dev deployment of Zookeeper+Mesos+Marathon

Just an experiment setting up a test deployment of Zookeeper + Mesos + Marathon on an existing machine with Docker installed.

Running it

docker-compose up -d

Accessing Mesos UI:

http://<hostip>:5050

@PatrickLang
PatrickLang / VagrantStatusAndCleanup.md
Created May 24, 2017 15:23
PowerShell snippet for finding all Vagrantfiles under a path and showing the status

I've made the mistake of accidently removing VMs with Remove-VM or Hyper-V Manager that I originally created with Vagrant. This is a set of code snippets I'm using to help prevent that and make it easy to find all Vagrant created VMs, remove the ones I don't need, then delete the boxes.

$oldpwd = $pwd ; gci -r Vagrantfile | %{ cd $_.Directory ; Write-Output "Checking status at $pwd" ; vagrant.exe status } ; cd $oldpwd

Other things I still need to do:

@PatrickLang
PatrickLang / VagrantStatusAndCleanup.md
Last active May 24, 2017 15:25
PowerShell snippet for finding all Vagrantfiles under a path and showing the status

I've made the mistake of accidently removing VMs with Remove-VM or Hyper-V Manager that I originally created with Vagrant. This is a set of code snippets I'm using to help prevent that and make it easy to find all Vagrant created VMs, remove the ones I don't need, then delete the boxes.

$oldpwd = $pwd ; `
gci -r Vagrantfile | %{ `
  cd $_.Directory ; `
  Write-Output "Checking status at $pwd" ; `
 vagrant.exe status } ; `
@PatrickLang
PatrickLang / VisualStudioAlmSetup.md
Last active June 5, 2017 22:24
Visual Studio Trial VHD on Azure

There's a prebuilt VHD with Windows Server 2016, Visual Studio 2017, and more for hands on labs available from https://almvm.azurewebsites.net/labs/tfs/ . This will upload it to Azure and create a ready to run VM :)

Unfortunately as of 6/5, it doesn't work. I can't connect to it presumably because Remote Desktop isn't enabled or the firewall port isn't open

Download all parts

(Invoke-WebRequest https://almvm.azurewebsites.net/labs/tfs/almvm2017url.txt -UseBasicParsing).Content -split '\r?\n' | %{ Start-BitsTransfer $_ }