<?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: Script to add banner for multiple devices in Scripting</title>
    <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21015#M321</link>
    <description>Create Date: Oct 27 2012 12:08AM&lt;BR /&gt;
&lt;BR /&gt;
Donno if you guys figured this out. But i have done this before.&lt;BR /&gt;
&lt;BR /&gt;
This is how it works&lt;BR /&gt;
&lt;BR /&gt;
line1....&lt;SPACE&gt;&lt;ENTER&gt;&lt;BR /&gt;
#blank line &lt;SPACE&gt; &lt;ENTER&gt;&lt;BR /&gt;
line2 &lt;SPACE&gt; &lt;ENTER&gt;&lt;BR /&gt;
end script with two enters&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Arpit&lt;BR /&gt;
  (from Arpit_Bhatt)&lt;/ENTER&gt;&lt;/SPACE&gt;&lt;/ENTER&gt;&lt;/SPACE&gt;&lt;/ENTER&gt;&lt;/SPACE&gt;</description>
    <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
    <dc:creator>EtherNation_Use</dc:creator>
    <dc:date>2014-01-08T05:49:00Z</dc:date>
    <item>
      <title>Script to add banner for multiple devices</title>
      <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21008#M314</link>
      <description>Create Date: May 21 2012  8:03AM&lt;BR /&gt;
&lt;BR /&gt;
I would like to create script that will ad banner to my devices.&lt;BR /&gt;
&lt;BR /&gt;
 Currentli have issues with diferent commands on XOS and Extremeware.&lt;BR /&gt;
&lt;BR /&gt;
 Also when i add in script something like:&lt;BR /&gt;
&lt;BR /&gt;
  configure banner before-login&lt;BR /&gt;
&lt;BR /&gt;
 ************************************************************&lt;BR /&gt;
&lt;BR /&gt;
 UNAUTHORIZED ACCESS&lt;BR /&gt;
&lt;BR /&gt;
 ************************************************************&lt;BR /&gt;
&lt;BR /&gt;
  &lt;BR /&gt;
&lt;BR /&gt;
 It gets stuck and cannot execute.&lt;BR /&gt;
&lt;BR /&gt;
  (from Davor_Gadanac)</description>
      <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21008#M314</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script to add banner for multiple devices</title>
      <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21009#M315</link>
      <description>Create Date: May 21 2012  4:31PM&lt;BR /&gt;
&lt;BR /&gt;
Keep in mind that in order to "end" a banner input, you need to hit "enter" twice because hitting it once, will only advance to the next line.&lt;BR /&gt;
&lt;BR /&gt;
 I have absolutely no problem configuring banners. What I can advise you: create a new script, use LF as end lines and after the banner content just add twice LF and it will work properly. &lt;BR /&gt;
&lt;BR /&gt;
  (from Eugen_NAIMAN)</description>
      <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21009#M315</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script to add banner for multiple devices</title>
      <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21010#M316</link>
      <description>Create Date: May 22 2012  1:56AM&lt;BR /&gt;
&lt;BR /&gt;
Hello,&lt;BR /&gt;
&lt;BR /&gt;
If i get it right, script should look like this:&lt;BR /&gt;
&lt;BR /&gt;
configure banner before-login&lt;BR /&gt;
&lt;BR /&gt;
************************************************************ "LF"&lt;BR /&gt;
&lt;BR /&gt;
UNAUTHORIZED ACCESS "LF"&lt;BR /&gt;
&lt;BR /&gt;
************************************************************ "LF"&lt;BR /&gt;
&lt;BR /&gt;
LF is with&amp;lt;&amp;gt; without quotes, of course.&lt;BR /&gt;
&lt;BR /&gt;
When i run script i'm getting "%% Invalid input detected at '^' marker." and marker points to nothing.&lt;BR /&gt;
&lt;BR /&gt;
Also, when i copy command and paste it directly to CLI on SW everything works OK.&lt;BR /&gt;
&lt;BR /&gt;
Do you have suggestions how to create script that will recognize SW if it is XOS or Extremeware and use diferent commands (Extremeware does not have before-login option).  (from Davor_Gadanac)</description>
      <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21010#M316</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script to add banner for multiple devices</title>
      <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21011#M317</link>
      <description>Create Date: May 27 2012  7:16PM&lt;BR /&gt;
&lt;BR /&gt;
You're quite right - this is how it should look. Better get my attached file and test that.&lt;BR /&gt;
&lt;BR /&gt;
 The upload failed anyway - I'll try to send you a PM with the script attached.&lt;BR /&gt;
&lt;BR /&gt;
 About your second issue - Ridgeline has a variable called $isExos which returns "True" if the switch is an XOS one; otherwise it returns "False".&lt;BR /&gt;
&lt;BR /&gt;
 An example:&lt;BR /&gt;
&lt;BR /&gt;
 IF (!$match($isExos,true) ) THEN&lt;BR /&gt;
 Echo "$deviceIP is an EXOS switch."&lt;BR /&gt;
 ELSE &lt;BR /&gt;
 Echo "$deviceIP is NOT an EXOS switch"&lt;BR /&gt;
 ENDIF&lt;BR /&gt;
&lt;BR /&gt;
 Good luck,&lt;BR /&gt;
&lt;BR /&gt;
  EDIT: unfortunately I can't attach any files to PM and I can't attach any files to the post here. If you want, you can PM me your email address and I'll do it that way.&lt;BR /&gt;
&lt;BR /&gt;
  (from Eugen_NAIMAN)</description>
      <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21011#M317</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script to add banner for multiple devices</title>
      <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21012#M318</link>
      <description>Create Date: Aug 31 2012 12:00PM&lt;BR /&gt;
&lt;BR /&gt;
Can you send me the file?&lt;BR /&gt;
william.f.haden@noaa.gov&lt;BR /&gt;
thanks.  (from Bill_Haden)</description>
      <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21012#M318</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script to add banner for multiple devices</title>
      <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21013#M319</link>
      <description>Create Date: Sep  2 2012  4:49PM&lt;BR /&gt;
&lt;BR /&gt;
I've sent you the script today William.&lt;BR /&gt;
&lt;BR /&gt;
I think you should remove your email from the above post and maybe change your username too because it will be likely to get gathered by spammers.  (from Eugen_NAIMAN)</description>
      <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21013#M319</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script to add banner for multiple devices</title>
      <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21014#M320</link>
      <description>Create Date: Oct 22 2012  5:11PM&lt;BR /&gt;
&lt;BR /&gt;
I have this same question. I think I'm stuck on the carriage return and linefeed.  How do I send that through to the switch from the script?&lt;BR /&gt;
&lt;BR /&gt;
Here is what I am trying right now:&lt;BR /&gt;
&lt;BR /&gt;
configure banner&lt;BR /&gt;
this is the banner\r\n&lt;BR /&gt;
\r\n&lt;BR /&gt;
&lt;BR /&gt;
   (from Ryan_Moore)</description>
      <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21014#M320</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script to add banner for multiple devices</title>
      <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21015#M321</link>
      <description>Create Date: Oct 27 2012 12:08AM&lt;BR /&gt;
&lt;BR /&gt;
Donno if you guys figured this out. But i have done this before.&lt;BR /&gt;
&lt;BR /&gt;
This is how it works&lt;BR /&gt;
&lt;BR /&gt;
line1....&lt;SPACE&gt;&lt;ENTER&gt;&lt;BR /&gt;
#blank line &lt;SPACE&gt; &lt;ENTER&gt;&lt;BR /&gt;
line2 &lt;SPACE&gt; &lt;ENTER&gt;&lt;BR /&gt;
end script with two enters&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Arpit&lt;BR /&gt;
  (from Arpit_Bhatt)&lt;/ENTER&gt;&lt;/SPACE&gt;&lt;/ENTER&gt;&lt;/SPACE&gt;&lt;/ENTER&gt;&lt;/SPACE&gt;</description>
      <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21015#M321</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script to add banner for multiple devices</title>
      <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21016#M322</link>
      <description>Create Date: Nov 26 2013  3:12PM&lt;BR /&gt;
&lt;BR /&gt;
Hello,&lt;BR /&gt;
&lt;BR /&gt;
someone have an example with a hit "enter" key ? &lt;BR /&gt;
&lt;BR /&gt;
Because when I test a script write in Ridgeline and execute on an equipment, it already stay at the first line and causes a timeout.&lt;BR /&gt;
&lt;BR /&gt;
My script is very simple :&lt;BR /&gt;
&lt;BR /&gt;
configure banner before-login&lt;BR /&gt;
bannertest&lt;BR /&gt;
\r\r&lt;BR /&gt;
&lt;BR /&gt;
I've tested to replace \r\r with &lt;ENTER&gt; or with LF command.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for any help.&lt;BR /&gt;
&lt;BR /&gt;
  (from tristan)&lt;/ENTER&gt;</description>
      <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21016#M322</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:49:00Z</dc:date>
    </item>
    <item>
      <title>RE: Script to add banner for multiple devices</title>
      <link>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21017#M323</link>
      <description>Create Date: Nov 27 2013  2:16AM&lt;BR /&gt;
&lt;BR /&gt;
I wonder how did you have the LF added to your text file because that is a non printed character.&lt;BR /&gt;
&lt;BR /&gt;
I have created a simple script to add that to the file and it worked really well.&lt;BR /&gt;
&lt;BR /&gt;
Download the attached file (right-click, Save Target As) and remove the "txt" extension, then try it.&lt;BR /&gt;
&lt;BR /&gt;
Do not modify the file yet - just try it first to see that if works. To modify it, open it in a text editor (SciTe, Notepad + or other editor which allows you to see the end of line characters). Modify the file and keep the LFs at the end. Once you save it - check it again to see if the LFs haven't been replaced with CRLFs, then run it again.&lt;BR /&gt;
&lt;BR /&gt;
Or easier if you're even a bit familiar with VisualBasic or any other scripting language:&lt;BR /&gt;
- have the text file ready with the text you want&lt;BR /&gt;
- write a short VB script to &lt;BR /&gt;
        - read the file&lt;BR /&gt;
        - replace CRLF with LF&lt;BR /&gt;
        - save the file&lt;BR /&gt;
&lt;BR /&gt;
job done &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://www.ethernation.net/Portals/1/Forums/Attachments/banner.xsf.txt" target="_blank" rel="nofollow noreferrer noopener"&gt;banner.xsf.txt&lt;/A&gt;  (from Eugen_NAIMAN)</description>
      <pubDate>Wed, 08 Jan 2014 05:49:00 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/scripting/script-to-add-banner-for-multiple-devices/m-p/21017#M323</guid>
      <dc:creator>EtherNation_Use</dc:creator>
      <dc:date>2014-01-08T05:49:00Z</dc:date>
    </item>
  </channel>
</rss>

