Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

Script to disable PoE?

Hello

Scripting is really not my thing but I need a simple script which will effectively sit in the routers flash and do the following:

conf t

Interface range gix/0/x - x

no power inline

Im sure it fairly simple but looking at EEM and TcL makes me think the script is going to need to be pages long to acomplish this little task.

Cheers

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Script to disable PoE?

Hello,

From the post, I could understand when we need to execute those commands but dont know when to understand. Below EEM will configure the interfaces during the bootup.

event manager applet DISABLE_POWER_INLINE

event timer countdown time 1

action 1.0 cli command "enable"

action 2.0 cli command "conf t"

action 3.0 cli command "interface range Gi1/0/1-48"

action 4.0 cli command "no power inline"

action 6.0 cli command "end"

action 7.0 syslog msg "******** POWER INLINE DISABLED ********"

Thanks & Regards,
Karthick Murugan
CCIE#39285

Thanks & Regards, Karthick Murugan CCIE#39285
5 REPLIES
Cisco Employee

Script to disable PoE?

Hello,

From the post, I could understand when we need to execute those commands but dont know when to understand. Below EEM will configure the interfaces during the bootup.

event manager applet DISABLE_POWER_INLINE

event timer countdown time 1

action 1.0 cli command "enable"

action 2.0 cli command "conf t"

action 3.0 cli command "interface range Gi1/0/1-48"

action 4.0 cli command "no power inline"

action 6.0 cli command "end"

action 7.0 syslog msg "******** POWER INLINE DISABLED ********"

Thanks & Regards,
Karthick Murugan
CCIE#39285

Thanks & Regards, Karthick Murugan CCIE#39285

Script to disable PoE?

Thanks, that works perfectly.

I used the line 'event none' as I wanted to call the event manually when I needed it

Cisco Employee

Script to disable PoE?

I am really glad that the script serverd the purpose.Please rate the post if it really helped!

Thanks & Regards,
Karthick Murugan
CCIE#39285

Thanks & Regards, Karthick Murugan CCIE#39285
Hall of Fame Super Gold

Script to disable PoE?

I used the line 'event none' as I wanted to call the event manually when I needed it

You want to disable PoE manually?   Then you can use switchport macro (not AUTO switchport macro).

Script to disable PoE?

Hi Leo

Currently we want to call the command manually but once I have had a little read up on EEM or TCL, we will likely want the script to be called by an event being triggered. Ideally they want a TFTP server to copy a file in to the flash, the script checks every 5 minutes for the existance of the file and then executes the script. Programming and scripting is not my forte and im not even sure its possible.

Cheers

908
Views
0
Helpful
5
Replies