Category Archives: Brain Dumps and Tech Notes

powercli – Detach Luns from a cluster

Overview: I recently had the need to remove some old LUNS from the SAN. After a vMotion of all VMs and Templates from the datastores in vSphere that corresponded to the LUNS needing removal, I followed the steps in the KB at

After unmounting the datastores in the vSphere Web Client, I used the below PowerCLI script to then detach the LUNs.