VMware Cloud Community
IT538332
Contributor
Contributor

Unused VM's

Hi,

I work in an environment where I have quite a few VM's. Due to storage shortages and resource restrictions I'm looking to find a quick and easy way of finding out which VM's have not been used for a certain period of time. Is there anyway I can find this out in bulk?

Thank You :smileyblush:

0 Kudos
2 Replies
termita_kaesar
Enthusiast
Enthusiast

For example with this command:

find /vmfs/volumes -name "*vmdk" -type f -mtime +6 | awk -F "/" '{print $NF}' | sort | uniq

You get all Disk, that has not been change in 6 days.

Cesar Garcia Descom, SL
JayantKohli
Contributor
Contributor

Hi there,

Is there a powerCLI script to find the same?

We would like to know which machines are dormant from past 30 days so that we can communicate with the users and delete them if not needed.

Regards,

J

0 Kudos