Hello,
How can I get a view desktop's status programmatically? I want to get the status that is displayed in the view administrator webpage under the "Status" column ( available | provisioned | agent unreachable etc...). I need to know if there are enough available desktops to kick off a test.
I have tried using powercli but the get-desktopvm or get-pool commands do not provide that information. I have also tried obtaining the vmState from the connection servers LDAP directory but that seems to always be "Ready". I have also tried using vdadmin.exe -M but it looks like that command just returns the same vmState from the LDAP data.
Is there any way to do this? How does the view admin web page calculate this state?
You can use Clint's unofficial View cmdlets. See his Unofficial Advanced VMware View Powershell Cmdlets post.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi,
Thanks for your help!
Since the post states it's unsupported, you'll have to make that call for yourself I'm afraid.
As input for your decission, since you only want to "get" the status, the cmdlet is relatively harmless (as Clinton also mentions in his post).
A "get" cmdlet will not change anything in the configuration.
You could consider the performance of the cmdlets and how they could potentially cause a kind of denial-of-service on the Connection Server.
I didn't see any heavy load on the Connection Server while using these cmdlets.
But it's your decission in the end :smileygrin:
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can use the Import-Module with a full path (in your case C:\Scripts) or
from some pre-defined locations. See the How to Import a Module post for the options and some examples.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
See also my reply to your other thread, but the following should do the trick
powershell.exe -File "yourscript.ps1"
When the script reaches the end, an implicit 'exit' is executed and the powershell.exe binary should return to your Perl script
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, but I also use the - Non interactive to run the ps1, and the powershell.exe never return to my perl script.
:smileycry:
Just to make sure, you do load the PowerCLI snapin in the script ?
Are there any prompts or confirmations that could cause the script to wait for input ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference