Disabling a View Pool with PowerCLI
Rob Daniels at ClearPath Solutions Group has an interesting post on disabling a view pool for VMware. He points out that there isn’t currently a PowerCLI command to do it, but came up with a PowerShell solution anyway.
Have you ever wanted to disable a VDI pool from the command line, but couldn’t find the right command for the job? As simple as it may seem to do, VMware has yet to equip the PowerCLI Snap-in with a “disable-pool” commandlet. Some may try to accommodate this by simply removing pool entitlements, but you can be faced with the following error:
Remove-PoolEntitlement : PowershellService::RemovePoolEntitlement FAILED,error=User with sid has an active VDI Session on Pool . Entitlement cannot beremoved until this session is terminated.
This error is the result of an active desktop session attached to the entitlement being removed, or worse, anywhere within the VDI system as this is a global property. What this means is that if a user has an entitlement to more than one pool, this command may fail every time. As a work-around, there is a value within the local ADAM database on the View broker server. It is a Boolean value with the name “pae-Disabled” and can be found in the vdi.vmware.int\Applications\ attribute of the local LDAP. Below is an example of how this value can be toggled from a script:
3 months ago - link

