Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 230777

Re: Run Batch in Guest Remotely via PowerCLI

$
0
0

The default ScriptType for Windows guest OS is PowerShell.

So you probably have an error saying that there is an "unexpected token" or something along that line.

You will have to make sure that PowerShell sees that first part as a [string], so place it between quotes.

Something like this

$guestvms="flash3"
$myscript='"e:\testfile.dat 8 0x0 11000" | Out-File C:\SQLIO\param.txt'
Invoke-VMScript-VM$guestvms-ScriptText$myscript-GuestUseradministrator-GuestPasswordPassword

Those are single quotes on the outside double quotes around the [string].


Viewing all articles
Browse latest Browse all 230777

Trending Articles



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