VMware
--
Questions
--
Followers
Top Experts
This is the KB article for enabling it.
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1026437
==========================
If i SSH into a host (using SecureCRT or Putty) and run this I am able to get this completed.
cp /etc/vmware/config /etc/vmware/config.bak
echo >> /etc/vmware/config
echo vmx.fullpath = "/bin/vmx" >> /etc/vmware/config
echo isolation.tools.copy.disab
echo isolation.tools.paste.disa
exit
==========================
I was able to get the closest with Posh-SSH, however that module becomes confused when I enter quotes within quotes.
$command1="Invoke-SSHComma
$command2="-index 0 -Command `"echo isolation.tools.copy.disab
$command3="Invoke-SSHComma
Invoke-SSHCommand -index 0 -Command "cp /etc/vmware/config /etc/vmware/config.bak"
Invoke-SSHCommand -index 0 -Command "echo >> /etc/vmware/config"
$command1 #this appears to simply put the output on the screen rather than running the command.
Invoke-SSHCommand $command2 #can't interpret the variable as part of the command
$command3
==========================
Is there another way I can go about this or is this a piece that must be completed using an SSH Client. I'm even open to the powershell opening PuTty, connecting, running commands then exiting back to powershell...but that is beyond me.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
#=========================
# HOST - Enable Copy/Paste #
#=========================
Write-Host "-- Execute Batch File " -foregroundcolor green
#-------------------------
Start-Process "cmd.exe" "/c C:\Scripts\VMware\Host-Cop
sleep -Seconds 10
#-------------------------
Then I modified script so there is only a prompt for hostname, but could easily add one for passwords for different environments. This will auto accept the ssh key.
@echo off
set /p new_host="Enter HostName "
echo yes | "C:\Program Files (x86)\PuTTY\plink.exe" -l root -pw password %new_host% "cp /etc/vmware/config /etc/vmware/config.bak"
"C:\Program Files (x86)\PuTTY\plink.exe" -l root -pw password %new_host% "echo " " >> /etc/vmware/config
"C:\Program Files (x86)\PuTTY\plink.exe" -l root -pw password %new_host% "echo "vmx.fullpath = /bin/vmx" >> /etc/vmware/config
"C:\Program Files (x86)\PuTTY\plink.exe" -l root -pw password %new_host% "echo isolation.tools.copy.disab
"C:\Program Files (x86)\PuTTY\plink.exe" -l root -pw password %new_host% "echo isolation.tools.paste.disa






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
seems a bit over the top to wrap it in PowerCLI/Powershell, you could use SSH keys, and perform SSH password less authentication.
you'll will need to use a password, that's a given with plink.
Not sure why the added complication of wrapping it in additional powershell, what's the benefit, other than another layer /
Most of us just use plink, in a batch file or cmd file.
This script assumes that plink is installed in a specific directory and the batch file is also in a specific directory.
Thanks Andrew!

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
VMware
--
Questions
--
Followers
Top Experts
VMware, a software company founded in 1998, was one of the first commercially successful companies to offer x86 virtualization. The storage company EMC purchased VMware in 1994. Dell Technologies acquired EMC in 2016. VMware’s parent company is now Dell Technologies. VMware has many software products that run on desktops, Microsoft Windows, Linux, and macOS, which allows the virtualizing of the x86 architecture. Its enterprise software hypervisor for servers, VMware vSphere Hypervisor (ESXi), is a bare-metal hypervisor that runs directly on the server hardware and does not require an additional underlying operating system.