Powercli 5.1 poster is out! goodies !

You can find it here:
http://blogs.vmware.com/vipowershell/files/2012/09/PowerCLI_5_1_Poster.pdf

Advertisements

Get-VMFolderPath to check in which vm folder our vm resides

Recently i wrote a function to check in which vm folder particular vm resides. I thought i could share it 😉 This function can output folder names or folder morefs when -moref switch is specified. Sample output would be this:
get-vm ‘vm123’ | get-vmfolderpath
MY DC1\vm\test123\ntest\btest\xtest\

Get-VMfolderPath (get-vm vm1).folderid
MY DC1\vm\test123\ntest\btest\xtest\

When you want to instead of names , folder morefs:

Get-VMfolderPath (get-vm vm1).folderid -moref or
get-vm ‘vm123’ |Get-VMfolderPath -moref
Datacenter-datacenter-242\Folder-group-v243\Folder-group-v740\Folder-group-v1434\Folder-group-v1435\Folder-group-v1436\
Continue reading