Skip to content

Add-HVDesktop

SYNOPSIS

Adds virtual machine to existing pool

SYNTAX

Add-HVDesktop [-PoolName] <String> [-Machines] <String[]> [[-Users] <String[]>] [[-Vcenter] <String>]
 [[-HvServer] <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Add-HVDesktop adds virtual machines to already exiting pools by using view API service object(hvServer) of Connect-HVServer cmdlet. VMs can be added to any of unmanaged manual, managed manual or Specified name. This advanced function do basic checks for pool and view API service connection existance, hvServer object is bound to specific connection server.

EXAMPLES

EXAMPLE 1

Add-HVDesktop -PoolName 'ManualPool' -Machines 'manualPool1', 'manualPool2' -Confirm:$false

Add managed manual VMs to existing manual pool

EXAMPLE 2

Add-HVDesktop -PoolName 'SpecificNamed' -Machines 'vm-01', 'vm-02' -Users 'user1', 'user2'

Add virtual machines to automated specific named dedicated pool

EXAMPLE 3

Add-HVDesktop -PoolName 'SpecificNamed' -Machines 'vm-03', 'vm-04'

Add machines to automated specific named Floating pool

EXAMPLE 4

Add-HVDesktop -PoolName 'Unmanaged' -Machines 'desktop-1.eng.omnissa.com'

Add machines to unmanged manual pool

PARAMETERS

-PoolName

Pool name to which new VMs are to be added.

Type: String
Parameter Sets: (All)
Aliases:

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

-Machines

List of virtual machine names which need to be added to the given pool.

Type: String[]
Parameter Sets: (All)
Aliases:

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

-Users

List of virtual machine users for given machines.

Type: String[]
Parameter Sets: (All)
Aliases:

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

-Vcenter

Virtual Center server-address (IP or FQDN) of the given pool. This should be same as provided to the Connection Server while adding the vCenter server.

Type: String
Parameter Sets: (All)
Aliases:

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

-HvServer

View API service object of Connect-HVServer cmdlet.

Type: Object
Parameter Sets: (All)
Aliases:

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

OUTPUTS

NOTES

Author Praveen Mathamsetty
Author email pmathamsetty@omnissa.com
Version 1.1
Dependencies Make sure pool already exists before adding VMs to it.

Tested Against Environment

Horizon View Server Version 7.0.2, 7.1.0
PowerCLI Version PowerCLI 6.5, PowerCLI 6.5.1
PowerShell Version 5.0