mongo shard + maxSize
Most likely you are using a different shell version than the db version. That is, the output of db.version() (the server version) and version() (the shell version) should be the same.

For example:

mongos&gt; db.version()
3.4.1
mongos&gt; version()
2.6.12
mongos&gt; config = db.getSiblingDB('config')
config
mongos&gt; config.shards.updateOne({_id:'shard01'},{$set:{maxSize:4194304}})
2016-12-22T13:22:56.154+1100 TypeError: Property 'updateOne' of object config.shards is not a function


Note the identical error message to the one you're seeing. This is because updateOne function doesn't exist in early mongo shell. However, using the correct version:

mongos&gt; db.version()
3.4.1
mongos&gt; version()
3.4.1
mongos&gt; config = db.getSiblingDB('config')
config
mongos&gt; config.shards.updateOne({_id:'shard01'},{$set:{maxSize:4194304}})
{
  "acknowledged": true,
  "matchedCount": 1,
  "modifiedCount": 1
}