About VESServer Parameter
This section describes how to work with an optional connection parameter in VEShell.
Most VEShell cmdlets support an optional –VESServer connection parameter. This parameter allows you to specify options for connecting to the Virtualization Extensions Service.
The following VEShell cmdlets support the –VESServer connection parameter:
- Disable-Monitoring (VMware)
- Disable-Monitoring (Hyper-V)
- Enable-Monitoring (Hyper-V)
- Enable-Monitoring (VMware)
By passing the –VESServer parameter to a VEShell cdmlet, you can define the name of the server where the Virtualization Extensions Service runs, port that the Virtualization Extensions Service "listens" and credentials of the user account under which the cmdlet's configuration task will be performed.
Thus, you can configure Virtualization Extensions Service running on the local computer or any remote machine of your choice.
By default, if the –VESServer parameter is not passed to a cmdlet, the configuration task will be performed for the Virtualizations Extensions Service on the localhost. This will use the default 8084 port number and credentials of the user who launched the VEShell console.
You can override this default behaviour by using the Start-VEShellClient cmdlet.
You can pass with the –VESServer parameter the following types of values: <String ComputerName> or Veeam.Psves.VesConnection object.
The <String ComputerName> value specifies the name of computer on which the Virtualization Extensions Service runs.
Acceptable formats for the input value are: server name (such as "localhost"), IP address (such as "188.8.131.52") and FQDN (such as "localhost.veeam.local").
If the <String ComputerName> value is passed in the -VESServer parameter, VEShell creates and opens a new connection session before executing the cmdlet. The connection session is created with the following properties: computer name passed with the -VESServer parameter, the default 8084 port number and credentials of the user who launched the VEShell console. After the cmdlet execution is completed, the connection session is closed automatically.
The Veeam.Psves.VesConnection object stores settings for connecting to the Virtualization Extensions Service: the name of the server where the Virtualization Extensions Service runs, port that the Virtualization Extensions Service "listens" and credentials of the user account under which the configuration task will be performed.
This object allows you to explicitly specify server name, username, password and port number for connecting to the Virtualization Extensions Service. This can be extremely useful for VEShell scripting.
Before you can pass the Veeam.Psves.VesConnection object, you need to create a connection session object using the New-VEConnection cmdlet. The -VESServer parameter accepts the created connection session object as the input value.
If the Veeam.Psves.VesConnection object is passed in the -VESServer parameter, VEShell automatically opens a connection session for the specified Virtualization Extensions Service before executing the cmdlet. This session is not closed after the cmdlet execution is completed. To close the session manually, use the Disconnect-VE cmdlet.