zenivox
Hot Shot
Hot Shot

Install vmtools 12 from ISO

Jump to solution

Hello, I need to update vmtools version 11.360 to 12, but our ESXi 6.5 U3 cannot be updated yet, it will take time. So I have to go from ISO. To accomplish this I grabbed few lines from this post https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/PowerShell-remoting-to-install-VMWare-... and tested locally, and it works. However, when inside Invoke-Command from remote it does not. These are the lines I'm using:

$CDRom = Get-WmiObject -class Win32_CDROMDrive | Select-Object Drive | ForEach-Object { $_.Drive }
$Subpath = '\setup64.exe'
$EXE = Join-Path -Path $CDRom -ChildPath $Subpath
Start-Process -FilePath $EXE -ArgumentList "/S /v /qn REBOOT=ReallySuppress"
 
until line 3 I can confirm all good, then Start-Process does not do anything and generates no error at all. From Task Manager on remote server nothing happens. Any idea?
0 Kudos
1 Solution

Accepted Solutions
zenivox
Hot Shot
Hot Shot
    $CDRom = Get-WmiObject -class Win32_CDROMDrive | Select-Object Drive | ForEach-Object { $_.Drive } 
    $Subpath = '\setup64.exe' 
    $EXE = Join-Path -Path $CDRom -ChildPath $Subpath 
    $runEXE = $EXE + " " + "/S /v /qn REBOOT=ReallySuppress"
    cmd.exe /c $runEXE 

 

no I didn't. Found the above to be working, not elegant but for now it'll do. 

View solution in original post

0 Kudos
4 Replies
LucD
Leadership
Leadership

How did you pass this to the Invoke-Command?
Did you try using a transcript log (Start-Transcript)?


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

0 Kudos
zenivox
Hot Shot
Hot Shot

Hi Luc,

very simply like this:

$block = {

    $CDRom = Get-WmiObject -class Win32_CDROMDrive | Select-Object Drive | ForEach-Object { $_.Drive }
    $Subpath = '\setup64.exe'
    $EXE = Join-Path -Path $CDRom -ChildPath $Subpath
    Start-Process -FilePath $EXE -ArgumentList "/S /v /qn REBOOT=ReallySuppress"

}

Invoke-Command -Session $Session -ScriptBlock $block

0 Kudos
LucD
Leadership
Leadership

Did you try to use a transcript file?


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

0 Kudos
zenivox
Hot Shot
Hot Shot
    $CDRom = Get-WmiObject -class Win32_CDROMDrive | Select-Object Drive | ForEach-Object { $_.Drive } 
    $Subpath = '\setup64.exe' 
    $EXE = Join-Path -Path $CDRom -ChildPath $Subpath 
    $runEXE = $EXE + " " + "/S /v /qn REBOOT=ReallySuppress"
    cmd.exe /c $runEXE 

 

no I didn't. Found the above to be working, not elegant but for now it'll do. 

0 Kudos