Getting this error -
You must enter the command at the vagrant prompt.
Yup, I had entered the command at vagrant prompt only.
Sorry but your screen shot indicates otherwise.
You entered the command at the mongo shell prompt MongoDB Enterprise >.
You have to exit the mongo shell to return to the vagrant shell.
Thanks, it works.
Closing this thread as the issue has been resolved.