Automation

 View Only
  • 1.  Run ESXi bash command from PowerCLI

    Posted Nov 20, 2020 03:17 PM

    Is it possible to run a bash command from the PowerCLI rather than enabling the ESXi's SSH and using an application such as PuTTy?

    I need to run a command similar to "sed -i 's/current/new/g' /etc/ssh/sshd_config" but I cannot enable SSH on each of the ESXi servers unless it is absolutely necessary.

    Thanks for any responses



  • 2.  RE: Run ESXi bash command from PowerCLI

    Broadcom Employee
    Posted Nov 20, 2020 08:07 PM

     
    Moderator: Moved to PowerCLI Discussions



  • 3.  RE: Run ESXi bash command from PowerCLI
    Best Answer

    Posted Nov 20, 2020 08:17 PM

    I'm afraid not.

    Note that you don't need to use putty anymore if you use the Posh-SSH module.

    See Use Posh-SSH instead of PuTTY



  • 4.  RE: Run ESXi bash command from PowerCLI

    Posted Nov 23, 2020 02:27 PM

    Thank you for letting me know, I will look into Posh-SSH module because it may be helpfully for other things as well.