get Aruba switch image file name in powershell

82 Views Asked by At

I am writting a script to make updating of Aruba switch(2540) automatically with powershell. the script use two main thing. PowerArubaSw for checking switch Firmware etc. and kitty for uploading the new Firmware file from my PC with TFTP Protocol(tftpd software).

this is the line that I run Kitty to upload the file. it works correctly(I hope variable names are clear enough).

& $aruba.kittyPath $aruba.IP -ssh -l $aruba.user -pw $aruba.password -cmd "\s02 \n Copy tftp flash $($updateInfo.tftpServerIP) $($updateInfo.fileName) secondary \n y \n \s02 \n wri mem" 

but after this line kitty shell will be open so, there will be two parallel process on system. 1.kitty 2.powershell script. and there is no comunication between them. therefore, the script does not know when it should go forwards. or easy saying, the Problem I have is that I do not know how to check if file is uploaded correctly to begin the installation in script.

hier is explainted to use

show flash | include Image

to get the image files but it does not work for me. does anyone have Idea how I can go forward?

0

There are 0 best solutions below