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

Re: I need a script to log into guest OS desktop, similar to option in guest customization wizard

$
0
0

The ScriptText parameter accepts a string that contains the code to be executed inside the guest OS.

The cmdlet is not going to read the content of your file.

But you can do

$script = 'c:\users\gman\desktop\insertPS.ps1'

$code = Get-Content $script

Invoke-VMScript -ScriptText $code -VM $VMs -GuestUser administrator -GuestPassword 'jjw1ldT$G'


Viewing all articles
Browse latest Browse all 189307

Trending Articles



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