VMware Cloud Community
leoyyoung
Contributor
Contributor

Unable to get output when execute "ifconfig" using Invoke-VMScript

Hi,

Now I would like to execute some scripts in vm using Invoke-VMScript, of course I would like to get the script output. This is the first time to use this.

When I do some try, I found I could not get the output sometimes, such as when execute "ifconfig", but I can get output when execute commands like "pwd"/'ls'...So i am a little confused and hope to get some help for this.

Please see the issue here:

question.png

0 Kudos
6 Replies
LucD
Leadership
Leadership

Which RedHat version is that ?


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

0 Kudos
leoyyoung
Contributor
Contributor

The redhat is Rethat Enterprise 6.2

0 Kudos
probo
Enthusiast
Enthusiast

What version of VMware tools are you using?

This works for me with RedHat 6.4, VMware tools 9.0.0.15210 (build-782409) and PowerCLI 5.5 release 1

0 Kudos
LucD
Leadership
Leadership

Although RH 6.* is not yet officially supported in the Invoke-VMScript cmdlet according to the documentation, this seems to work for me.


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

0 Kudos
leoyyoung
Contributor
Contributor

Today I try Redhat 6.5, VMware tools 9.0.0.15210 (build-782409) and PowerCLI 5.5 release 1. But still not work ok. So strange.

0 Kudos
leoyyoung
Contributor
Contributor

Yeah, it is very strange, today I try Redhat 6.5, VMware tools 9.0.0.15210 (build-782409) and PowerCLI 5.5 release 1, also does not work fine.

0 Kudos