VMware Cloud Community
fborges555
Enthusiast
Enthusiast
Jump to solution

Deploy exe with invoke-vmscript

Hi gurus

 

I am tryingto deploy an exe to all my VDI using invoke-vmscript, so I am using the following

$File = "application.exe"
$Param = "/quiet /norestart"
$SrcPath = "c:\"
$Fullpath = $SrcPath + $File
$cred=Get-credential


$deploy = $fullpath + $File + $Param

Invoke-VMScript -VM $VM -ScriptText $$deploy -GuestCredential $Cred

 

but it just does not do anything, there is no error, only comes back to prompt and the installation is not done,

what did I miss???

 

Thanks a bunch

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Looks like the application.exe is twice in $deploy
And you have $$deploy instead of $deploy


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

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

Looks like the application.exe is twice in $deploy
And you have $$deploy instead of $deploy


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

0 Kudos