07-10-2014 03:23 PM
I am in charge of making Powershell the Go To tool for our SAN environment. What is Brocades official position on Powershell? If Brocade is embracing the tool do we have a module available? Do we have a list of starter scripts available? I did not have any luck searching the web, please let me know if things were missed.
07-15-2014 08:03 AM - edited 07-24-2014 07:00 AM
I found only this script in this forum:
I think the first problem ist to talk SSH via PowerShell. Therefor you can use this PowerShell Module:
My goal is also to get some infos from Brocade SAN Switch with PowerShell. So far I have written this script, which isn't finished yet.
new version see last post
07-16-2014 06:38 AM
The above script looks very useful. Have you made any additonal progress to it, i am very interested in your efforts as do i think many other people will be.
07-16-2014 06:51 AM
May i also ask what sort of values you stored in SSH-Sessions.psd1 which i assume contains "$SshSession"?
07-16-2014 07:04 AM
The psd1 file is the module for making ssh connections with powershell. This module is very userful! See also:
Unfortunately I haven't made any progress with the script. The problem is with parsing the output from porterrshow, as I don't know any command to get that info for every port individually. So I have to parse the complete list in powershell, which I haven't finished yet.
07-16-2014 07:22 AM
AH! I understand now. I mistakenly thought that invoke-ssh was part of powershell. I really appreciate you sharing what you have. I have some similar goals in mind but i wont be able to start on it for a while.
07-23-2014 02:21 AM - edited 07-24-2014 07:01 AM
Here is a little update to the script:
see last post for the script
07-24-2014 07:07 AM - edited 08-13-2014 02:19 AM
I have made a few optimizations to the script. For example the sfpshow is used with "-all" instead of querying every sfp individually, which makes the script much faster. Also I have bugfixed some things for FabOS 7.
Also you can fill the variables in the beginning and can start with the script. I fill my variables with values from a global config script.
08-05-2014 03:48 AM - edited 08-05-2014 03:52 AM
At the moment I try to get the portnames with "portname". This works via SSH on all switches (6.4.2b and 7.2.0a), but when trying to get this information via PowerShell, I only get the values for the switches with the newer firmware.
Has anybody a solution to this?
portname port 2: storage1 port 3: server1 port 4: server2 ...
PS D:\scripts> $SshSessions.$SwitchIP.RunCommand('portname') CommandText : portname CommandTimeout : -00:00:00.0010000 ExitStatus : 127 OutputStream : Renci.SshNet.Common.PipeStream ExtendedOutputStream : Renci.SshNet.Common.PipeStream Result : Error : rbash: portname: command not found
08-13-2014 02:11 AM - edited 08-29-2014 05:12 AM
So here is the script so far and I think it works fine so far.
[Script removed, as newer version exists, see below]