[go: nahoru, domu]

Skip to content

AutomatedLab.Recipe Invoke-LabRecipe - hardcoded roles/ISOs definitions #1413

Answered by nyanhp
MikeyBronowski asked this question in Q&A
Discussion options

You must be logged in to vote

@MikeyBronowski recipes are only for easier use, the preferred way is and will remain creating a lab definition to fully customize your environment.

Take a look at Get-Command -Noun LabSnippet for a customizable solution, if you want modularization:

Get-LabSnippet *domain*
Get-LabSnippet -Type SampleScript
Get-LabSnippet -Type CustomRole

# Create new snippet
$sql2019Snippet = {
    Add-LabIsoImageDefinition -Name SQLServer2019  -IsoPath "$labSources/ISOs/sql2019.iso"

    # Variable $DomainName is inherited from the required domain snippet. Do
    # your own handling if you don't need this.
    Add-LabMachineDefinition -Name SQL001 -Role SQLServer2019 -DomainName $DomainName
}

New-LabSn…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MikeyBronowski
Comment options

Answer selected by MikeyBronowski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1412 on October 15, 2022 08:55.