I'm a little bit stuck because I would like to delete some VMDK file from vSphere with a PowerShell or PowerCLI command.
I know how to do that from the vSphere vCenter GUI but I didn't find how to do that with a command.
Do you think that there is a way to do that with something like:
Remove-Item path/to/my/VMDK
If someone has already made this, can you show me how?
You could use the
vmstores
PSDrive option that will allow you to use standard PowerShell functionalities alongside an authenticated vSphere session.Example of polling your available datastores:
Additional info: Browse datastores using PowerCLI