Skip to main content
xshkurti
Staff
Staff
February 9, 2026

Technical Tip: Scheduling PoE on managed FortiSwitch

  • February 9, 2026
  • 0 replies
  • 447 views
Description This article describes how to configure Power over Ethernet (PoE) ports on FortiSwitch devices based on a schedule. It provides a step-by-step guide on using automation stitches on FortiGate to enable or disable PoE on FortiSwitch ports at specific times.
Scope FortiGate, FortiSwitch.
Solution

To schedule PoE on FortiSwitch to be active or not, automation stitches on FortiGate can be utilized. This involves defining a scheduled trigger, creating a CLI script action, and tying them together in an automation stitch.

 

The following are the steps:

  1. Go to System -> Automation Trigger and create a new trigger. Set the trigger type to 'scheduled' and configure the trigger frequency, hour, and minute according to the requirements.


PoEontrigger.png
Using the CLI:

 

config system automation-trigger
    edit "PoE_on_morning"

        set trigger-type scheduled
        set trigger-frequency daily
        set trigger-hour 09
        set trigger-minute 00
    next

    edit "PoE_off_evenings"
        set trigger-type scheduled
        set trigger-frequency daily
        set trigger-hour 18
        set trigger-minute 00
    next
end

 

  1. Go to System -> Automation Action and create a new action. Set the action type to 'cli-script' and configure the script to enable or disable PoE on the desired FortiSwitch port. Make sure to change FortiSwitch SN and also edit port list. Port3 is taken as an example, but the full port list can be configured the same way as doing it manually.


PoEaction.png
Using the CLI:


config system automation-action
    edit "PoE_on_script"

        set action-type cli-script
        set accprofile "super_admin"
        set script "
            config switch-controller managed-switch
                edit <FortiSwitch_serial>     <----- Change FortiSwitch serial number.
                    config ports
                        edit port3
                            set poe-status enable
                        next
                    end
                next
            end
        "
    next

    edit "PoE_off_script"
        set action-type cli-script
        set accprofile "super_admin"
        set script "
            config switch-controller managed-switch
                edit <FortiSwitch_serial>     <----- Change FortiSwitch serial number.
                    config ports
                        edit port3
                            set poe-status disable
                        next
                    end
                next
            end
        "
    next
end

 

  1. Go to System -> Automation Stitch and create a new stitch. Tie the scheduled trigger and CLI script action together, and set the required option to 'enable'.


PoEStitch.png
Using CLI:


config system automation-stitch
    edit "PoE_on_evenings_stitch"

        set trigger "PoE_on_morning"
            config actions
                edit 1
                    set action "PoE_on_script"
                    set required enable
                next
            end
        next
    end

    edit "PoE_off_evenings_stitch"
        set trigger "PoE_off_evenings"
            config actions
                edit 1
                    set action "PoE_off_script"
                    set required enable
                next
            end
        next
    end

 

The same procedure can be followed for every change that is needed on a per-schedule basis., where variables can not be used.