Comments (8)
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.
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.
@jrodsguitar The Remove-HVPool already has this parameter, maybe look at it and implement the same way.
from powercli-example-scripts.
@admoseley #222 was merged. Can you update and try it out?
from powercli-example-scripts.
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.
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.
@freythman Just got around to it and it works like a charm. Thank you sir!
from powercli-example-scripts.
Fixed
from powercli-example-scripts.
Related Issues (20)
- Desktop.Desktop_Update can't update Datastore settings
- Modify SsoAdmin module to use SecureString for Passwords HOT 1
- remove-hventitlement removes all entitlements
- New-OSCustomizationSpec DomainAdminPassword and DomainPassword properties from DomainCredentials show plain text. HOT 1
- Set-SsoAuthenticationPolicy: Certificate Revocation "Disabled" Option?
- Get-HVPoolSpec of manual pool does not include machine info
- deleteOrRefreshMachineAfterLogoff can only be set for floating user assignment HOT 1
- GlobalSettings.GlobalSettings_Update can't update displayPreLoginMessage (and other boolen properties) via function HOT 1
- Please Add flag for -AddGroup to Set-SsoPersonUser
- Unexpected error Get-SsoPersonUser getting [email protected] HOT 1
- Updating Connection Server General settings HOT 1
- Launching an application headlessly on VMware Horizon server using PowerCLI
- Error while importing pool in json HOT 1
- VMWare.HV.Helper - New-HVPool: Implement addVirtualTPM for instant clones HOT 1
- VMWare.HV.Helper - New-HVPool: implement vGPU profile for instant clones HOT 1
- Non-persistent OS customization spec for Linux does not copy extension data - customization fails HOT 1
- Import-CIVAppTemplate fails HOT 1
- Creating New-HVPool with NVIDIA A16 vGPU Profiles
- Support Modern Auth methods in VMware.vSphere.SsoAdmin
- Support specifying NumCPU, Ram, CoresPerSocket parameters for the Start-HVPool cmdlet
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powercli-example-scripts.