VMware Cloud Community
tdubb123
Expert
Expert

using plink to replace config file

any idea how to replace a config file on esx host via plinkl?

$esxhosts = get-vmhost -anme (get-content vmhosts.txt)

foreach ($vmhost in $esxhosts)

{

$plink = "c:\scripts\plink.exe"

$file = "c:\scripts\test.txt"

$user = "root"

$pswd = "xxxx"

plink $plink $vmhost $user $pswd ......

}

0 Kudos
1 Reply
LucD
Leadership
Leadership

Yes, stop using plink.exe.

See Use Posh-SSH instead of PuTTY


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

0 Kudos