Skip to content

Instantly share code, notes, and snippets.

View mike-myers-tob's full-sized avatar

Mike Myers mike-myers-tob

View GitHub Profile
@mike-myers-tob
mike-myers-tob / Windows 11 on VMware Fusion.md
Last active May 23, 2022 19:03
Windows 11 Insider Preview in a VMware Fusion VM

You might have been told This PC doesn't currently meet Windows 11 system requirements because your VM doesn't have TPM 2.0 and Secure Boot. This guide is for you.

Tested in VMware Fusion 12.1.2 on a macOS Big Sur 11.6 host.

Note: this guide is for running x86-64 Windows 11 in a VM on an x86-64 Mac host machine. M1 Macs need Parallels, to virtualize ARM Windows 11 on M1-based Macs (even if Microsoft officially doesn't want this).

Step 1: VM settings

Switching the VM's firmware to UEFI from BIOS

@mike-myers-tob
mike-myers-tob / Working GDB on macOS 11.md
Last active May 8, 2024 22:17
Steps to get GDB actually working in April 2021 on macOS (Intel x86-64 only)

Debug with GDB on macOS 11

The big reason to do this is that LLDB has no ability to "follow-fork-mode child", in other words, a multi-process target that doesn't have a single-process mode (or, a bug that only manifests when in multi-process mode) is going to be difficult or impossible to debug, especially if you have to run the target over and over in order to make the bug manifest. If you have a repeatable bug, no big deal, break on the fork from the parent process and attach to the child in a second lldb instance. Otherwise, read on.

Install GDB

Don't make the mistake of thinking you can just brew install gdb. Currently this is version 10.2 and it's mostly broken, with at least two annoying bugs as of April 29th 2021, but the big one is https://sourceware.org/bugzilla/show_bug.cgi?id=24069

$ xcode-select install  # install the XCode command-line tools
# New-ADUser cmdlet is included in the Active Directory PowerShell module.
#
# Prereuquisite install:
#
# Windows 10 -> Go to Manage optional features in Settings.
# Click Add a feature to see the list of available RSAT tools.
# Install "RSAT: Active Directory Domain Services and Lightweight
# Directory Services Tools".
# You can only install RSAT on Professional or Enterprise editions
# of the Windows client operating system.
@mike-myers-tob
mike-myers-tob / Add_Local_Users.ps1
Created November 25, 2020 04:25
PowerShell to create 100k local users
# 1) The 100k users CSV file is here: https://docs.google.com/spreadsheets/d/1yPr_eutYWxUZX5ZhygvaMwi15aLVsjWNs275kQI4Q9A/edit?usp=sharing
# 2) Download it as a CSV, rename it to Users.csv in the directory of this script.
# 3) Run this script in an Administrator PowerShell prompt. It will take probably 10-20 minutes to complete.
$dataSource=import-csv "Users.csv"
foreach($dataRecord in $dataSource) {
$displayName = $dataRecord.FirstName + " " + $dataRecord.LastName
$userName = $dataRecord.FirstName
New-LocalUser -Name $userName -FullName $displayName -Description "Test user" -NoPassword -Disabled
}