Quantcast
Channel: VMware Communities : Popular Discussions - VIX API
Viewing all articles
Browse latest Browse all 34639

Issue with vmrun runProgramInGuest running 2008 Powershell commands

$
0
0

 

I am trying to run an install script in powershell on a 2008 server using vmrun from a linux server. I have had a few problems doing this and am wondering if there is a way to make it work..

 

 

The first problem was trying to pass the &, I could not figure out how to do that?

 

 

To work around this I created a .bat file, coppied it using vmrun to the guest, then try to run it (I copy and run about 5 files, .bat and msi). All of the files run as expected except the .bat with the powershell (which runs fine while logged in as administrator). When I run it remotely using vmrun it appears it is not picking up some of the path variables that are for administrator, and so the script is confused and putting files in the wrong places... I thought about using runas but it can not be interactive... so I can not pass the admin password in runas (and I would prefer not to transfer and install yet another program to get that functionality).

 

 

So the work around I have right now is to also schedule a task that runs the .bat file with the powershell script once, then kick it off... that works... but seems very glued to gether...

 

 

thanks

 

 

Keven

 

 


Viewing all articles
Browse latest Browse all 34639

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>