Hi gurus
I am looking to do the following and I need some help
I would like a script that stop the Pool Desktop provisioning and the delete all VM under that Pool
Pool A-> disable provision->remove/delete all VM under Pool A.
where do I start gurus.
Thanks
So it does work.
Ok, to get the name of the pool try
The Name field in there should show you the name of the pool
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Would something like this work for you?
This does require the VMware.HV.Helper module.
Get-HVMachine -PoolName 'MyPool' | Remove-HVMachine
Set-HVPool -PoolName 'MyPool' -Start
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
L.
Thanks a bunch for jumping in
will this cmdlet disable the pool or disable provisioning?
I never work with module before , so I download the entire module/script
Thanks in advance
Unfortunately, that module is not (yet) on the PS Gallery.
So yes, you have to download it from github and copy the folder to one of your PowerShell module folders.
There are instructions in Run Example Horizon PowerCLI Scripts
That command will disable provisioning.
The Set-HVPool cmdlet also has a Disable switch.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
L.
I get empty results when running , I am connecting to the connection server
What do you mean?
A remote PS session to the Connection Server or did you do a Connect-HVServer?
Have a look at Automating VMware Horizon 7 with VMware PowerCLI.
It explains how to use the module.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
L.
I did a connection-hvserver
connect-hvserver -server IP
get-hvpool |select Displayname
I am just looking for a list of all pool in view admin
thanks
When you do a Get-HVPool by itself, no Select-Object, is there anything returned?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
So it does work.
Ok, to get the name of the pool try
The Name field in there should show you the name of the pool
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
L.
as always thanks a bunch
I guess is a matter of learning all the select and switches for this helper
Thanks a bunch
where do I find all doc on vmware.HV.Helper so I can learn, like the expandproperty base
Thanks
There is unfortunately not that much information available about that module.
The last link I included is one of the better posts on the module.
The ExpandProperty parameter is in fact a PowerShell thing.
I suggest you start with that blog post.
And then have a look at these 2 roadmaps for PowerShell and PowerCLI.
https://thecrazyconsultant.com/powershell-study-guide-core-concepts/
https://thecrazyconsultant.com/powercli-study-guide-core-concepts/
For more on the VMware.Hv.Helper Wouter's website is a good source.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference