Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
BoddenBF
New Contributor

Fortimanager CLI Template error

Hello there,

 

I created a CLI template to generate CSRs on Fgt units as follows:

 

execute vpn certificate local generate rsa $(y) 4096 10.$(y).0.1 DO STI STI TEST SEG b@domain.com IP:10.$(y).0.1,DNS:s$(y).x.org,DNS:s$(y).x.org x/app/cert/scep/ password

 

Where $(y) is a meta variable for branch ids, but the result is error: "-999 - invalid value - syntax error". If i input the same script substituting the meta variable with the branch id directly on the units console it works just fine.

 

Appreciate any help,

BoddenBF.

 

 

Daniel Bodden
Daniel Bodden
2 REPLIES 2
johnathan
Staff
Staff

You should be able to validate the CLI Template and preview what it pushes to the device by following this guide: https://docs.fortinet.com/document/fortimanager/7.2.0/new-features/260251/improved-cli-templates-wit...
If the validation succeeds, please check the preview and post the output here. 

"Never trust a computer you can't throw out a window."
BoddenBF

Thanks for replying. The validation is successful, all variable mappings are set. The preview shows the same script i input manually on the units:

 

execute vpn certificate local generate rsa Y 4096 10.Y.0.1 DO STI STI TEST SEG b@domain.com IP:10.Y.0.1,DNS:sY.dyndns.org,DNS:s3Y.dyndns.org x/app/cert/scep/ pass

 

Daniel Bodden
Daniel Bodden
Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors