VMware Cloud Community
piotrlotr1
Enthusiast
Enthusiast
Jump to solution

Currently best way to remove files from datastore?

Hello,

So I'm using Remove-Item to delete folder with some files within and it works "out-of-the-box" with my current PowerShell/PowerCLI configuration.

 

 

 

Remove-Item -Path "<pathToFolderOnDatastore>\<targetDatastore>" -Recurse

 

 

 

It generates as I believe a task for deleting each file in my vCenter (and that looks a bit scary btw).

However when I browse a datastore directly from that vCenter, tick target folder and hit "DELETE" it generates one task ONLY.

 

Q: What vCenter uses to delete files/folders from datastore?

Q: What's the best way to remove files from datastore?

Reply
0 Kudos
1 Solution
1 Reply