New-LWVMWareVM

SYNOPSIS

Create a new VMWare VM

SYNTAX

New-LWVMWareVM -Name <String> -ReferenceVM <String> -AdminUserName <String> -AdminPassword <String>
 [-DomainName <String>] -DomainJoinCredential <PSCredential> [-AsJob] [-PassThru] [<CommonParameters>]

DESCRIPTION

Create a new VMWare VM

EXAMPLES

Example 1

PS C:\> New-LWVMWareVM -Name Host1 -ReferenceVM Server2019GoldenMaster -AdminUserName Hans -AdminPassword Reuben -DomainName contoso.com -DomainJoinCredential $vm.GetCredential((Get-Lab))

Create a new VM from a reference VM

PARAMETERS

-AdminPassword

The admin password

Type: String
Parameter Sets: (All)
Aliases:

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

-AdminUserName

The admin user

Type: String
Parameter Sets: (All)
Aliases:

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

-AsJob

Indicates that the cmdlet should run in the background

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-DomainJoinCredential

The credential to join a domain. Can be retrieved from each lab VM

Type: PSCredential
Parameter Sets: (All)
Aliases:

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

-DomainName

The domain to join

Type: String
Parameter Sets: (All)
Aliases:

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

-Name

The machine name

Type: String
Parameter Sets: (All)
Aliases:

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

-PassThru

returns the created machine

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-ReferenceVM

The reference VM to create the new VM from

Type: String
Parameter Sets: (All)
Aliases:

Required: True
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

System.Object

NOTES