PowerCLI: Rename VM Inventory Name

PowerCLI: Rename VM Inventory Name

If you have seen my older post about changing the Windows hostname I have also had the challenge of changing the VM names within the inventory to match. Here is the rather simple solution to do this

set-vm Old-VM-NAME=01 -name 'New-VM-Name=01' -confirm:$false
set-vm Old-VM-NAME=02 -name 'New-VM-Name=02' -confirm:$false
set-vm Old-VM-NAME=03 -name 'New-VM-Name=03' -confirm:$false

 

Advertisements