- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Get-DesktopVM status from View pool Inventory tab with PowerCLI
Hello!
Is there a way to get the status of the DesktopVM using PowerCLI (some other option, besides looking at it?). I'm referring to the status column one sees by navigating in View Admin: Left side menu -> Inventory -> Pools -> (select a pool) -> (select Inventory tab of the selected pool) next to the Task column.
Any hint appreciated!
Regards, Blaz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to get this as well.. I am trying to see when certain VM desktops are in a certain state and then remove them if they are.. the example I have is that we have Desktops that go into an "Already Used" state which from my searching seems to be an acknowledged status that is not considered a "bad" thing by VMWare but this causes problems in automatic pools as desktops in that state count against the spare desktop count therefore stopping users from getting in.. I am trying to write a script to counteract this by simply removing any desktops that enter this state as at that point they are useless.. we are already doing this manually but it is a pain..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The status of the desktop reported in Admin UI is combination of ADAM data and the latest volatile state reported by Agent to Broker.
There's a no Powershell equivalent to get the states. But you can query the ADAM to get the state.
1. Check if the Agent is responsive vdmadmin -A -d desktopname -m machinename -getversion
2. Check if the VM is READY and has zero sessions (use Get-DesktopVm cmdlet)
3. Machine entry in ADAM has the pae-dirtyfornewsessions attribute set to 1 for this desktop