Community discussions

MikroTik App
 
IYARINDRA
just joined
Topic Author
Posts: 16
Joined: Fri Apr 07, 2017 6:13 pm

Removing Certificate

Wed Nov 18, 2020 6:44 pm

Hi,

I tried to removed the certificates ... It's run fine on terminal but not in script.
For example:
/certificate 
remove 0
remove 1
remove 2
remove 3
remove 4
remove 5
remove 6
remove 7
remove 8
remove 9
remove 10
In terminal, everything is perfect. But when I run it from script, it's not working.
Or is there any workaround?
 
User avatar
eworm
Forum Veteran
Forum Veteran
Posts: 749
Joined: Wed Oct 22, 2014 9:23 am
Location: Oberhausen, Germany
Contact:

Re: Removing Certificate

Sun Nov 22, 2020 6:04 pm

You should never ever use index numbers in scripts. These are just temporary and refer to the last print.
To remove all certificates use this:
/certificate remove [ find ];
Manage RouterOS scripts and extend your devices' functionality: RouterOS Scripts
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1874
Joined: Sat Dec 24, 2016 11:17 am
Location: jo.overland at gmail.com

Re: Removing Certificate  [SOLVED]

Mon Nov 23, 2020 9:11 pm

Just a comment to:
/certificate remove [ find ]
This will remove all certificate, if that is your intention

If you just want to remove some:
/certificate remove  [find where name~"cert_name"]
 
Why do not use Splunk to monitor your MikroTik Router(s)? Look at this page in how to set it up.

MikroTik->Splunk
 
 
msatter
Forum Guru
Forum Guru
Posts: 2012
Joined: Tue Feb 18, 2014 12:56 am
Location: Netherlands / Nīderlande

Re: Removing Certificate

Mon Nov 23, 2020 9:43 pm

You should never ever use index numbers in scripts. These are just temporary and refer to the last print.
To remove all certificates use this:
/certificate remove [ find ];
You can use print in a script by adding without-paging and as stated using numbers is not the best way to do this.
Loving my freedom and so, no Twitter, no Facebook/Instagram/WhatsApp, no Apple and no Google/Alphabet.

Running:
RouterOS 6.48 / Winbox 3.27 64bits
 
IYARINDRA
just joined
Topic Author
Posts: 16
Joined: Fri Apr 07, 2017 6:13 pm

Re: Removing Certificate

Tue Nov 24, 2020 3:53 am

Thank you very much everyone.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 22 guests