ONTAP Discussions
ONTAP Discussions
Hi All. I just wanted to find out if they can make the 'set [mode]' command with the rest of the command into one line of command. We are trying to monitor with the automated script so for them it would be a struggle if they have to separate those two lines when running the script.
Would there be someway they can cheat or work around the way ?
Best,
Hello
You should be able to use the ";" to separate multiple commands . As for the set command you can use the -c (confirmation) set to off.
Per example:
cluster::> set diag -c off; cluster ring show
Hope this answer your question.
Thanks
Correct. And don't worry about doing set admin/adv/diag. Just run them all from set diag.
I would strongly recommend to not run all as set diag. Diag mode has a number of things that are different on some commands and can cause you trouble. You should always go for least privilege needed.
I agree.
When using the CLI, sure. But when scripting them out, it doesn't really matter. You're not going to tab complete yourself into trouble. You'll run the same command you would in admin priv, just at diag level and it won't vary.
Diag commands are only different because you have extra flags you can run. They're not different simply because they're in diag priv.