You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure how best to phrase this. The examples all show how to create a lab and I've found those really helpful. Is there then a way to build my script in such a way that I could "continue" building out my lab from wherever I left off?
e.g., I've created a lab with a single server. I save it, have to quit/restart/whatever. I want to continue where I left off and ideally do that in the same script that I could then give to others. So I'd do all of the "New-*" commands, but what would be the equivalent to "create if not exists" that I could use for that setup on a different machine - or perhaps the other way around "import if exists"?
Would it be something like the following?
$lab = Import-Lab MyLab
If ($lab -eq $null) {
New-Lab MyLab
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Not sure how best to phrase this. The examples all show how to create a lab and I've found those really helpful. Is there then a way to build my script in such a way that I could "continue" building out my lab from wherever I left off?
e.g., I've created a lab with a single server. I save it, have to quit/restart/whatever. I want to continue where I left off and ideally do that in the same script that I could then give to others. So I'd do all of the "New-*" commands, but what would be the equivalent to "create if not exists" that I could use for that setup on a different machine - or perhaps the other way around "import if exists"?
Would it be something like the following?
$lab = Import-Lab MyLab
If ($lab -eq $null) {
New-Lab MyLab
}
Beta Was this translation helpful? Give feedback.
All reactions