Automation

 View Only
  • 1.  using plink to replace config file

    Posted Aug 10, 2020 03:12 PM

    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 ......

    }



  • 2.  RE: using plink to replace config file

    Posted Aug 10, 2020 03:28 PM

    Yes, stop using plink.exe.

    See Use Posh-SSH instead of PuTTY