You need to change the labels in the script to match your settings for this script to work:
%Interface% Change to the interface on which you will be enabling snmp
%Company% Change to the company name
%Company Location% Change to the Company location
%SNMP Server IP% Change to the local monitoring server IP or set as 0.0.0.0 for any.
config system interface edit "%Interface%" set allowaccess ping https ssh snmp fgfm next end
config system snmp sysinfo set description "%Company%" set location "%Company Location%" set status enable end
config system snmp community edit 1 set events cpu-high mem-low fm-if-change config hosts edit 1 set interface "%Interface%" set ip %SNMP Server IP% next end set name "public" set trap-v1-status disable set trap-v2c-status disable next end