Please explain what you want to do. You don’t want to delete a Vm from Horizon but you want to remove it. Does that mean you still want to keep the VM but remove it from being managed by Horizon?
That's exactly what I need.
Horizon View Management Console is just managing the desktops IN vCenter. I want to remove the desktop from the Horizon View pool in the management console but not delete it from vCenter.
Reason - Users have a full clone and when they leave the company we want to be able to retain the desktop for 45 days in vCenter (powered off) but not have it listed in the Horizon View Pool any longer. We currently have it automated to mark custom attributes in the VM and power it off and moved to a specific folder in vCenter, we just need to be able to remove it from Horizon with an automated process/script to complete the task. (We do not have vRO/vRA).
Thanks for the reply!
I think one way to do this is to:
- Clone existing VM to new VM
- Remove / Delete original VM from Horizon
- Remove Horizon Agent from new cloned VM.
Since you are already using automation, you could probably incorporate some of the code from my remove-HVMachine function to accomplish step 2.
So ironically you will end up deleting VM. At least the original
It's very straight forward to use:
remove-HVMachine -cred $cred -viewserver $viewserver -machine $machine
How are your desktops provisioned? Manual, Linked Clones etc?
Have you looked at ADSIEDIT to do this - depending on how desktops are provisioned, you may have to change Pool sizes etc so they are not recreated etc....