Giter VIP home page Giter VIP logo

Comments (8)

gpeck29 avatar gpeck29 commented on August 16, 2024 1

Right or Wrong, but I modified the psm1 file. On line #10147 ($deleteSpec.DeleteFromDisk = $true) I changed the $true to $false and tested it. The desktop was removed from Horizon View, but not from vCenter. Maybe a modification of the Remove-HVMachine cmdlet is coming to allow us to use an argument to the function to determine if the machine is removed and deleted or just removed.

from powercli-example-scripts.

jrodsguitar avatar jrodsguitar commented on August 16, 2024 1

I can look into adding an argument as suggested by @gpeck29.

Maybe I'll have:

Remove from Horizon View but not delete the machine:

Remove-HVMachine -noDelete

from powercli-example-scripts.

gpeck29 avatar gpeck29 commented on August 16, 2024 1

@jrodsguitar The Remove-HVPool already has this parameter, maybe look at it and implement the same way.

from powercli-example-scripts.

CajunBard avatar CajunBard commented on August 16, 2024 1

@admoseley #222 was merged. Can you update and try it out?

from powercli-example-scripts.

Magneet avatar Magneet commented on August 16, 2024

there is, it's just not been build int he module yet. it is https://vdc-repo.vmware.com/vmwb-repository/dcr-public/e2e25628-4ed2-43fc-8bad-54fb86f3bb0f/8e4d2491-c740-4778-ac43-ba8fc0ec8175/doc/vdi.resources.Desktop.html#removeMachinesFromManualDesktop for multiple or https://vdc-repo.vmware.com/vmwb-repository/dcr-public/e2e25628-4ed2-43fc-8bad-54fb86f3bb0f/8e4d2491-c740-4778-ac43-ba8fc0ec8175/doc/vdi.resources.Desktop.html#removeMachineFromManualDesktop for a single desktop

from powercli-example-scripts.

CajunBard avatar CajunBard commented on August 16, 2024

Added -DeleteFromDisk to Remove-HVMachine in #222

Defaulted to $true so to not remove the machine from vSphere you would set it to false Remove-HVMachine -MachineName 'VMName01' -DeleteFromDisk:$false

from powercli-example-scripts.

admoseley avatar admoseley commented on August 16, 2024

@freythman Just got around to it and it works like a charm. Thank you sir!

from powercli-example-scripts.

admoseley avatar admoseley commented on August 16, 2024

Fixed

from powercli-example-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.