FeatureCompatibility version command gives error

Hello everyone. I have been tasked with upgrading our mongod from v4 to v6. Following the instructions provided by AI, I get this error:

db.adminCommand({ getParameter: 1, featureCompatibilityVersion: 1 })

-bash: syntax error near unexpected token `{’

I appreciate your help with this. Many thanks.

This needs to be executed in mongosh connected to the cluster being upgraded.

The error indicated this is being run on the bash command line.

1 Like