Hello I'm having a bit of problem with the Invoke-VMScript cmdlet I have made a script that creates a virtual Windows 7 machine and then some powershell script executes on the machine for example renaming the computer to the correct name.
But if I run
Invoke-VMScript -ScriptText {(Get-Wmiobject -Class Win32_ComputerSystem).Rename($strName)}
The $strName variable doesn't get resolved, anyone have any idea on how to do this?