VMware Cloud Community
BenFB
Virtuoso
Virtuoso

Error when using Invoke-VMScript

We are trying to use Invoke-VMScript to configure a VM without network connectivity. 

When using Invoke-VMScript cmdlet we get the error "Could not locate "Powershell" script interpreter in any of the expected locations. Probably you do not have enough permissions to execute command within guest." 

We are using the local administrator account on the vm. We’ve tested running the same script on the VM, and it works.

Reply
0 Kudos
42 Replies
LucD
Leadership
Leadership

It looks as if it might be a missing permission in the guest OS.

One of the possible faults on the ReadEnvironmentVariableInGuest method is

fault.jpg


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

Reply
0 Kudos
BenFB
Virtuoso
Virtuoso

LucD We are logging in to the guest as the local administrator account. It's the only account that exists and the guest is not yet joined to a domain.

Reply
0 Kudos
LucD
Leadership
Leadership

It's nearly impossible for me to determine why the "permission denied" comes when the function tries to start the script inside the guest OS.

Is there anything in the Security Eventlog that could help? Or in any of the other eventlogs?


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

Reply
0 Kudos