Isn’t it annoying when you are looking for a VM on your datastore and you cant find it because the folder name is not the same as the VM,
use the below script and you will never have that problem again.
This script will compare the name of the VM to the folder it is stored in, any mismatches will be output.
I know a regex expert could probably do this better, let me know if you are one
Sample Output:
VM | Path |
New VM 1 | storage1 New VM |
ABCDEV01 | storage1 Dev Test |
MicroDS | SAN11 New VM |
VM127 | SAN11 Windows 2003 Server |
For more information visit: http://www.virtu-al.net/2009/06/22/powercli-folder-name-mismatch/