New-LabDefinition

SYNOPSIS

Creates a new lab definition

SYNTAX

New-LabDefinition [[-Name] <String>] [[-Path] <String>] [[-VmPath] <String>] [[-ReferenceDiskSizeInGB] <Int32>]
 [[-MaxMemory] <Int32>] [[-Notes] <Hashtable>] [-UseAllMemory] [-UseStaticMemory]
 [[-DefaultVirtualizationEngine] <String>] [-NoAzurePublishSettingsFile] [[-AzureSubscriptionName] <String>]
 [-Passthru] [<CommonParameters>]

DESCRIPTION

Needed for defining a lab definition which is a mandatory 'container' for the lab to be deployed. To be called before any other function of AutomatedLab.

EXAMPLES

EXAMPLE 1

New-LabDefinition -Name MyTestLab1

Creates a new lab definition with the name MyTestLab1

EXAMPLE 2

New-LabDefinition -Name MyTestLab1 -DefaultVirtualizationEngine HyperV

Creates a new lab definition with the name MyTestLab1 and instructs AutomatedLab that all machines being added to the lab, is to be Hyper-V based machines unless anything else is specified using the -VirtualizationHost parameter on Add-LabMachineDefinition.

EXAMPLE 3

New-LabDefinition -Name MyTestLab1 -DefaultVirtualizationEngine Azure -Path C:\MyLabs

Creates a new lab definition with the name MyTestLab1 and instructs AutomatedLab that all machines being added to the lab, is to be Azure based machines unless anything else is specified using the -VirtualizationHost parameter on Add-LabMachineDefinition.

EXAMPLE 4

New-LabDefinition -Name MyTestLab1 -DefaultVirtualizationEngine HyperV -Path C:\MyLabs -vmPath D:\VMs

Creates a new lab definition with the name MyTestLab1 and instructs AutomatedLab that all machines being added to the lab, is to be Hyper-V based machines unless anything else is specified using the -VirtualizationHost parameter on Add-LabMachineDefinition.

EXAMPLE 5

New-LabDefinition -Name MyTestLab1 -DefaultVirtualizationEngine HyperV -MaxMemory 8GB

Creates a new lab definition with the name MyTestLab1 and instructs AutomatedLab that all machines being added to the lab, is to be Hyper-V based machines unless anything else is specified using the -VirtualizationHost parameter on Add-LabMachineDefinition.

If 8GB of memory if more than 80% of the available memory, the memory will be limited to 8GB for the entire lab where the machines will split these 8GB in a weighted approach based on what role(s) the machines are to have. This is only true if the memory is NOT specified when defining machine using Add-LabMachineDefinition.

EXAMPLE 6

New-LabDefinition -Name MyTestLab1 -DefaultVirtualizationEngine HyperV -UseAllMemory

Creates a new lab definition with the name MyTestLab1 and instructs AutomatedLab that all machines being added to the lab, is to be Hyper-V based machines unless anything else is specified using the -VirtualizationHost parameter on Add-LabMachineDefinition.

80% of all available memory will be used for the entire lab where the machines will split this memory in a weighted approach based on what role(s) the machines are to have. This is only true if the memory is NOT specified when defining machine using Add-LabMachineDefinition.

EXAMPLE 7

New-LabDefinition -Name MyTestLab1 -DefaultVirtualizationEngine HyperV -UseStaticMemory

Creates a new lab definition with the name MyTestLab1 and instructs AutomatedLab that all machines being added to the lab, is to be Hyper-V based machines unless anything else is specified using the -VirtualizationHost parameter on Add-LabMachineDefinition.

All machines will be using static memory as opposed the default dynamic memory.

PARAMETERS

-Name

Name of lab. Name must only contain character a-z, A-Z and 0-9.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

Path of placement of lab XML files containing the lab configuration

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VmPath

Path of placement of Hyper-V based machines

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReferenceDiskSizeInGB

Specifies the size of the base disk to create for each used Operating System

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: 50
Accept pipeline input: False
Accept wildcard characters: False

-MaxMemory

Maximum memory to use for lab if using automatic configuration of memory for each machine (by not specifying the memory at all)

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-Notes

Notes to add to the lab

Type: Hashtable
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-UseAllMemory

Instructs AutomatedLab to use 80% of all available memory for the lab where the machines will split this memory in a weighted approach based on what role(s) the machines are to have. This is only true if the memory is NOT specified when defining machine using Add-LabMachineDefinition.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-UseStaticMemory

Instructs AutomatedLab to only configure static memory for all machines if using automatic configuration of memory for each machine (by not specifying the memory at all).

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-DefaultVirtualizationEngine

Virtualization engine to use as default for the lab. When not specifying the -VirtualizationHost parameter

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NoAzurePublishSettingsFile

???

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AzureSubscriptionName

Specifying what Azure subscription to use as default. This could be needed if having more than one Azure subscription to make sure a specific subscription is used.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 7
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Passthru

Indicates that the created definition should also be returned

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

None

NOTES