Tag Archives: script

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 https://kb.vmware.com/s/article/2004605?lang=en_US

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