VMware Cloud Community
Rotoi
Contributor
Contributor

Rename a guest os name with VM name

Hi,

This is about renaming a guest os name with the VM name.

It appears the variable containing the VM name is empty when it is passed to the script that is run by Invoke-VMScript so the guest os is not renamed. Is there a way to get the value of the variable containing the VM name in the script ran by Invoke-VMScript ?

Thanks

0 Kudos
1 Reply
LucD
Leadership
Leadership

You can use the ExpandString method, see my Here strings and the ExpandString method for more info.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos