This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
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.')] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.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) |