Automation

 View Only
  • 1.  Currently best way to remove files from datastore?

    Posted Oct 27, 2023 11:48 AM

    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?



  • 2.  RE: Currently best way to remove files from datastore?
    Best Answer