The Horizon PowerCLI cmdlets, which are used to perform various administration tasks on Connection Server and a Windows desktop, can also be used for Linux desktops.

Create a Manual Desktop Pool

Add-ManualPool -DefaultProtocol Blast -AllowProtocolOverride $false -threedRender usevc|vgpu  -Pool_id <pool id> [more parameters]

The following options and values are mandatory for the Linux desktop.

  • DefaultProtocol Blast

  • AllowProtocolOverride $false

  • threedRender usevc|vgpu. For a vGPU desktop, use -threedRender vgpu and for a 2D/vSGA/vDGA desktop, use -threedRender usevc .

Examples

  • Create a floating Linux Desktop pool named LinuxDesktop with a virtual machine (VM), LinuxVM-01.

    Add-ManualPool -DefaultProtocol Blast -AllowProtocolOverride $false -threedRender usevc -Pool_id LinuxDesktop -Id (Get-DesktopVM -Name LinuxVM-01).id -Persistence NonPersistent -Vc_name myvc.myorg.org
  • Create a dedicated Linux vGPU desktop pool named LinuxDesktop with all VMs that begin with the VM name as LinuxVM-.

    Get-DesktopVM | Where-Object {$_.Name.StartsWith("LinuxVM-")} | Add-ManualPool -DefaultProtocol Blast -AllowProtocolOverride $false -Persistence Persistent -threedRender vgpu  -Pool_id LinuxDesktop 
  • Create floating Linux desktop pool LinuxDesktop with the first RHEL 6 x64 VM.

    Get-DesktopVM | Where-Object {$_.GuestID -eq "rhel6_64Guest"} | Select-Object -Index 0  | Add-ManualPool -DefaultProtocol Blast -AllowProtocolOverride $false -Persistence NonPersistent -threedRender usevc -Pool_id LinuxDesktop

Create a Full-Clone Automated Desktop Pool

Add-AutomaticPool -DefaultProtocol Blast -AllowProtocolOverride $false -threedRender usevc|vgpu `
-Pool_id <pool id> -Vc_id <vCenter id> `
-NamePrefix <VM Name Prefix>" `
-templatePath <Virtual Machine Template Path> `
-VmFolderPath <Virtual Machine Folder Path> `
-ResourcePoolPath <Resource Pool Path> `
-dataStorePaths <Datastore Path> `
-customizationSpecName <Customization Specification Name> `
 [more parameters]

The following options and values are mandatory for Linux desktops.

  • DefaultProtocol Blast

  • AllowProtocolOverride $false

  • threedRender usevc|vgpu For a vGPU desktop, use -threedRender vgpu and for a 2D/vSGA desktop, use -threedRender usevc.

Example

Add-AutomaticPool -DefaultProtocol Blast -AllowProtocolOverride $false -threedrender usevc`
-pool_id FullClone-Linux `
-Vc_id (Get-ViewVC -serverName myvc.myorg.org).vc_id   `
-NamePrefix "FullClone-{n:fixed=3}" `
-Persistence NonPersistent –deletePolicy DeleteOnUse `
-VmFolderPath "/LinuxVDI/vm/FullClone" `
-ResourcePoolPath "/LinuxVDI/host/LinuxVDICluster/Resources" `
-templatePath "/LinuxVDI/vm/LinuxTemplate" `
-dataStorePaths "/LinuxVDI/host/LinuxVDICluster/datastore" `
-customizationSpecName "linux-spec" `
-maximumCount 100

Add or Remove Desktop Pool Entitlement

  • Entitle a domain user group of domain mydomain.org to LinuxDesktop.

    Add-PoolEntitlement -Pool_id LinuxDesktop -Sid (Get-User -Name "domain user" -Domain "mydomain.org").sid
  • Remove the entitlement of a domain user group of mydomain.org domain from LinuxDesktop.

    Remove-PoolEntitlement -Pool_id LinuxDesktop -Sid (Get-User -Name "domain user" -Domain "mydomain.org").sid

Assign or Remove User to or from the VM in Dedicated Desktop Pool

  • Assign the myuser user to the LinuxVM-01 VM, which is in a dedicated desktop pool.

    Update-UserOwnership -Machine_id (Get-DesktopVM -Name "LinuxVM-01").machine_id -Sid (Get-User -Name "myuser" | Where-Object {$_.cn -eq "myuser"}).sid
  • Remove the myuser user from the LinuxVM-01 VM, which is in a dedicated desktop pool.

    Remove-UserOwnership -Machine_id (Get-DesktopVM -Name "LinuxVM-01").machine_id

Logoff Desktop Connection

  • Log out from the desktop session of myuser.

    Get-RemoteSession -Username "mydomain.org\myuser" | Send-SessionLogoff

For more information on the broker PowerCLI cmdlet, see "Using View PowerCLI" in Horizon 7 Integration.