Last active
May 11, 2021 15:52
-
-
Save nyanhp/f99663b4e3a01ac23a84a3b7892f162d to your computer and use it in GitHub Desktop.
Using AutomatedLab recipes
This file contains 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
Install-Module AutomatedLab.Recipe -AllowClobber -Force | |
# Inline definition and execution | |
LabRecipe MySuperLab { | |
DeployRole = 'Domain', 'SQL' | |
VmPrefix = 'LB' | |
} | Invoke-LabRecipe | |
# Store a lab for later use | |
New-LabRecipe -Name MySuperLab -DeployRole DscPull,CI_CD | |
# List recipes | |
Get-LabRecipe | |
Get-LabRecipe -Name MySuperLab | |
# WHen Invoking, you can specify optional parameters | |
Invoke-LabRecipe -Name MySuperLab -DefaultAddressSpace 192.168.11.0/24 | |
# To just grab the script and modify it, use NoDeploy and PassThru or outFile | |
$scriptblock = Invoke-LabRecipe -Name MySuperLab -DefaultAddressSpace 192.168.11.0/24 -NoDeploy -PassThru -OutFile .\MySuperLab.ps1 | |
& $scriptblock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment