Skip to content

Instantly share code, notes, and snippets.

View jakehildreth's full-sized avatar
💭
❤️💜💙

Jake Hildreth jakehildreth

💭
❤️💜💙
View GitHub Profile
$labName = 'SmallServer1'
#create an empty lab template and define where the lab XML files and the VMs will be stored
New-LabDefinition -Name $labName -DefaultVirtualizationEngine HyperV
#make the network definition
Add-LabVirtualNetworkDefinition -Name $labName -AddressSpace 192.168.81.0/24
Set-LabInstallationCredential -Username Install -Password Somepass1
@jakehildreth
jakehildreth / Build-ALPKILab.ps1
Last active July 5, 2025 20:07
A small script that builds a small PKI lab using AutomatedLab.
<#
TODO: Create 'PAW' as a Custom Role that includes RSAT.
TODO: Accept Roles as Parameter.
#>
[CmdletBinding()]
param (
[PsfValidatePattern('^\w{1,11}$', ErrorMessage = 'Lab name must be no longer than 11 characters and only contain letters and numbers.')]
$Name = 'Locksmith',
[PsfValidatePattern('\.', ErrorMessage = 'Domain must contain at least one dot.')]
@jakehildreth
jakehildreth / Out-HostColored.ps1
Created December 13, 2024 10:57 — forked from mklement0/Out-HostColored.ps1
PowerShell function that colors portions of the default host output that match given patterns.
<#
Prerequisites: PowerShell version 2 or above.
License: MIT
Author: Michael Klement <[email protected]>
DOWNLOAD, from PowerShell version 3 or above:
irm https://gist.github.com/mklement0/243ea8297e7db0e1c03a67ce4b1e765d/raw/Out-HostColored.ps1 | iex
param(
)
#requires -Modules ActiveDirectory
$VerbosePreference = "Continue"
# Ensure the script is running with elevated privileges
$IsElevated = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
if (-not $IsElevated) {
@jakehildreth
jakehildreth / Add-DevToMyWinServer.ps1
Created January 24, 2024 13:40 — forked from bentman/Add-DevToMyWinServer.ps1
Script to install Dev Tools on Windows Server 2022
<#
.SYNOPSIS
Script to install Dev Tools on Windows Server (tested on 2022)
.DESCRIPTION
Installs the following from multiple resources:
Microsoft.VCLibs v14.00 (github)
Microsoft.UI v2.7.3 (github)
winget-cli v1.6.2771 (github)
Microsoft pwsh.exe vCurrent (winget)
Microsoft.WindowsTerminal v1.18.2822.0 (github)