<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Powershell VSP enable/disable port in ExtremeSwitching (VSP/Fabric Engine)</title>
    <link>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78641#M1215</link>
    <description>&lt;P&gt;thanks for sharing&lt;/P&gt;</description>
    <pubDate>Thu, 08 Apr 2021 18:50:47 GMT</pubDate>
    <dc:creator>PeterK</dc:creator>
    <dc:date>2021-04-08T18:50:47Z</dc:date>
    <item>
      <title>Powershell VSP enable/disable port</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78637#M1211</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I search how to configure port (example: enable/disable)&amp;nbsp;on VSP 8400&amp;nbsp;&amp;nbsp;with Powershell&amp;nbsp;&lt;BR /&gt;No probleme on&amp;nbsp;X440 (EXOS)&amp;nbsp;&amp;nbsp;with SSHCommand but don’t work on VSP&amp;nbsp;&lt;BR /&gt;The connection seems good but the orders&amp;nbsp;(Invoke-SSHCommand) are blocked for few seconds, and after connection lost&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can you hlep me ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 23:04:29 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78637#M1211</guid>
      <dc:creator>matth59del</dc:creator>
      <dc:date>2021-04-07T23:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell VSP enable/disable port</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78638#M1212</link>
      <description>&lt;P&gt;I never used this Posh-SSH module, but reading its documentation here &lt;A href="https://www.powershellmagazine.com/2014/07/03/posh-ssh-open-source-ssh-powershell-module/" target="_blank" rel="nofollow noreferrer noopener"&gt;https://www.powershellmagazine.com/2014/07/03/posh-ssh-open-source-ssh-powershell-module/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;it seems to me that Invoke-SSHCommand is sending the commands in a dedicated SSH channel within the SSH session; this is how SSH emulates the older rsh. But this mode will not work with VOSS. VOSS SSH server requires an interactive shell to be run inside the SSH channel.&lt;/P&gt;&lt;P&gt;So I think you will need to use the $session.Session.CreateShellStream approach from the same link above.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 01:20:20 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78638#M1212</guid>
      <dc:creator>Ludovico_Steven</dc:creator>
      <dc:date>2021-04-08T01:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell VSP enable/disable port</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78639#M1213</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;ok I understand, I will test&lt;BR /&gt;Thank you for your prompt response.&lt;BR /&gt;have a good day.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 14:29:22 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78639#M1213</guid>
      <dc:creator>matth59del</dc:creator>
      <dc:date>2021-04-08T14:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell VSP enable/disable port</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78640#M1214</link>
      <description>&lt;P&gt;Juste for information, it’s perfectible but it’s working&amp;nbsp; like this:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#install module&lt;BR /&gt;#Install-Module -Name Posh-SSH -force&lt;/P&gt;&lt;P&gt;#create username/pw&lt;BR /&gt;$userName = "admin"&lt;BR /&gt;$password = "password"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;#create $cred as secure string using $username and $password&lt;BR /&gt;$secstr = New-Object -TypeName System.Security.SecureString&lt;BR /&gt;$password.ToCharArray() | ForEach-Object {$secstr.AppendChar($_)}&lt;BR /&gt;$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $secstr&lt;/P&gt;&lt;P&gt;#create ssh session to server that fired alert using $cred&lt;BR /&gt;$sessionSSH = New-SSHSession -ComputerName "&lt;EM&gt;switch_IP&lt;/EM&gt;" -Credential $cred -AcceptKey&lt;/P&gt;&lt;P&gt;#set stream&lt;BR /&gt;$stream = $sessionSSH.session.CreateShellStream("PS-SSH", 0, 0, 0, 0, 1000)&lt;/P&gt;&lt;P&gt;#invokes stream to run command as sudo. gets pw from $secstr&lt;BR /&gt;$result = Invoke-SSHStreamExpectSecureAction -ShellStream $stream -command "enable" -ExpectString "10" -SecureAction $secstr&lt;BR /&gt;$result = Invoke-SSHStreamExpectSecureAction -ShellStream $stream -command "configure terminal" -ExpectString "10" -SecureAction $secstr&lt;BR /&gt;$result = Invoke-SSHStreamExpectSecureAction -ShellStream $stream -command "interface gigabitEthernet 3/15" -ExpectString "10" -SecureAction $secstr&lt;BR /&gt;$result = Invoke-SSHStreamExpectSecureAction -ShellStream $stream -command "shutdown" -ExpectString "10" -SecureAction $secstr&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;$stream.Read()&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;$id_session = Get-SSHSession&amp;nbsp;&lt;/P&gt;&lt;P&gt;Remove-SSHSession $id_session&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 15:41:52 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78640#M1214</guid>
      <dc:creator>matth59del</dc:creator>
      <dc:date>2021-04-08T15:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell VSP enable/disable port</title>
      <link>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78641#M1215</link>
      <description>&lt;P&gt;thanks for sharing&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 18:50:47 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremeswitching-vsp-fabric/powershell-vsp-enable-disable-port/m-p/78641#M1215</guid>
      <dc:creator>PeterK</dc:creator>
      <dc:date>2021-04-08T18:50:47Z</dc:date>
    </item>
  </channel>
</rss>

