Posh-ssh switch HP2530

Welcome Forums General PowerShell Q&A Posh-ssh switch HP2530

Viewing 2 reply threads
  • Author
    Posts
    • #76647
      Participant
      Topics: 1
      Replies: 1
      Points: 0
      Rank: Member

      Hello friends, how are you? 🙂
      Please see if you can help me ... I use Posh-ssh to manage Mikrotik routerboards and it works perfectly. However now I want to
      Also automate configuration of switches (in my scenario, they are all
      HP 2530-24G). I can connect normally via posh-ssh (it appears in the
      Log switch as logged), however, any command I try
      Invoking it does not recognize ... I believe it is by the following: – In that
      Swich template, when I log in for the first time, it is necessary to press the
      Enter to be able to fully start the session .... However I do not know how
      Invoking this command by posh / powershell .... do you have any ideas?
      I found something in this sense but I do not know how to use:

      # $ Test = new-object -c wscript.shell
      # $ Test.sendkeys ("{ENTER}")

      Note: I am invoking the commands as follows:

      Invoke-SSHCommand -Command "system-view" -SessionId 0
    • #76809
      Keymaster
      Topics: 13
      Replies: 4872
      Points: 1,870
      Helping HandTeam Member
      Rank: Community Hero

      Have you tried "`n" to send a carriage return?

      • #76815
        Participant
        Topics: 1
        Replies: 1
        Points: 0
        Rank: Member

        Yes, not work. 🙁

    • #76821
      Participant
      Topics: 2
      Replies: 376
      Points: 0
      Rank: Member

      I believe you need to use New-SSHShellStream instead of New-SSHSession

Viewing 2 reply threads
  • The topic ‘Posh-ssh switch HP2530’ is closed to new replies.