Hi LucD,
As you recommended to open a separate mail thread, hence i'm opening a new thread for Storage reclamation.like LUN not in use/Orphaned file/Powered-off VM's deletion etc.
Any other way to reclaim the unused storage ?
Thanks
V
There are several types of in-use storage that can be reclaimed.
For orphaned files, you can use my Orphaned Files And Folders – Spring Cleaning post and add the -Delete switch.
But only after you have run the function without the -Delete switch and verified the resulting report!
For snapshots, again after verification, it is quite straightforward.
Get-VM | Get-Snapshot | Remove-Snapshot -Confirm:$false
What other kinds of in-use storage did you have in mind?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
There are several types of in-use storage that can be reclaimed.
For orphaned files, you can use my Orphaned Files And Folders – Spring Cleaning post and add the -Delete switch.
But only after you have run the function without the -Delete switch and verified the resulting report!
For snapshots, again after verification, it is quite straightforward.
Get-VM | Get-Snapshot | Remove-Snapshot -Confirm:$false
What other kinds of in-use storage did you have in mind?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
LucD,
if you dont mind, i did try to clean up an orphaned file using the attached script, but it always generate the Zombie file report instead of deleting the Orphaned/Zombie file. It would be nice if you can help me to fix the script for Zombie or Orphaned file cleanup. It always generate the report but never deleted when i compare with Rv tools report.
Thanks
V
You have to use the -Delete switch when you actually want to remove the files and folders.
But make sure to check the report, from a run without the -Delete switch, first!
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you LucD.
you mean Remove-OrphanedData should be replaced by -Delete
No, that last line should look like this
Export-Csv D:\DC_Zombie.csv -NoTypeInformation –UseCulture
But make absolutely sure that you know what you are doing.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you LucD. First, i need to run and test in a smaller environment. Will verify later.